开发者

How to install j2sdk 1.4.2 on 64bit linux?

I have a problem with installation of java j2sdk 1.4.2 on 64bit linux (Ubuntu 10.04). Did anybody handle it?

uname -a

2.6.32-25-generic #44-Ubuntu SMP Fri Sep 17 20:05:27 UTC 2010 x86_开发者_开发百科64 GNU/Linux

I run a self-extracting file

sudo ./j2sdk-1_4_2_02-linux-i586.bin

but I get

tail: cannot open `+473' for reading: No such file or directory

Oracle forum has no answer.


The problem is that the ubuntu tail command doesn't understand the 'tail +<>' syntax. You need to edit the file, being careful not to corrupt the content that is after the 473rd line, replacing the tail command with 'tail -n +473' instead. This should get you past this problem.


You should always prefer Ubuntu's package management system before trying to install software manually.

Is there a reason why you want to install the outdated Java version 1.4.2? It's better to install the latest Java version, which is version 6. Note that Sun Java 6 is backward compatible with 1.4.2; anything that runs on 1.4.2 will also run on Java 6.

Also note that you can use "javac -target 1.4" to ensure that the generated class files will be compatible with 1.4 JVM.

If you really have a special reason to install Sun Java 1.4.2: Ubuntu works with .deb (Debian) packages.


Try "chmod a+x ..." is this package for 64 bit OS? how abt try to run it on a 32 bit OS? When you run "sudo ./j2sdk-1_4_2_02-linux-i586.bin", are you really in the same path? how abt try to use absolute path.

obviously, @Jeroen Rosenberg's way is much better


you could have also temporarily replace tail command binary with a bash script, or alias or something, handling arguments the way you want :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜