On Wednesday 28 December 2005 23:09, Bartosz Sokolowski wrote: > Hello! > > I decided to install JVM on my system (Debian testing). I downloaded > necessary files from IBM e.g. ibm-java2-jre-50-linux-ppc.tgz and installed > java-package via apt. Then I did: > (as user) > fakeroot make-jpkg ibm-java2-jre-50-linux-ppc.tgz > [everything worked fine] > (as root) > dpkg -i ibm-j2re1.5.0_powerpc.deb > [everything installed fine] > Then I configured Konqueror to use Java (put path to java - /usr/bin/java). > And... there is no effect. Java in Konqueror doesn't work (tested on > www.map24.com) and if I type 'java' in bash (as user) I only get: > JVM not found: libjvm.so - libjvm.so
The same thing happen to me. I think this is a debian java-package bug. The IBM Java try to find its home directory by following the symbolic link. (File /usr/bin/java should be a symbolic link on your machine.) But the IBM Java follow the symbolic link only once, which cause the problem. In the default debian settings, /usr/bin/java is a symbolic link to /etc/alternatives/java, and /etc/alternatives/java is a symblic link to /usr/lib/j2sdk1.5-ibm/bin/java. ~~~snip~~~ bauxite:/home/neo# ls -l /usr/bin/java lrwxrwxrwx 1 root root 22 2005-12-30 23:46 /usr/bin/java -> /etc/alternatives/java bauxite:/home/neo# ls -l /etc/alternatives/java lrwxrwxrwx 1 root root 30 2005-12-03 10:29 /etc/alternatives/java -> /usr/lib/j2sdk1.5-ibm/bin/java bauxite:/home/neo# ls -l /usr/lib/j2sdk1.5-ibm/bin/java lrwxrwxrwx 1 root root 15 2005-12-03 10:29 /usr/lib/j2sdk1.5-ibm/bin/java -> ../jre/bin/java bauxite:/home/neo# ls -l /usr/lib/j2sdk1.5-ibm/jre/bin/java -rwxr-xr-x 1 root root 80258 2005-11-04 11:55 /usr/lib/j2sdk1.5-ibm/jre/bin/java ~~~snip~~~ If you strace java binary, you will find the problem. The java binary find /usr/bin/java is point to /etc/alternatives/java, and consider directory /etc is java home directory. Then it try to find libjvm.so under directory /etc and failed. ~~~snip~~~ bauxite:/home/neo# strace java execve("/usr/bin/java", ["java"], [/* 40 vars */]) = 0 uname({sys="Linux", node="bauxite", ...}) = 0 ... omit some lines here, which load the dynamic library ... getpid() = 4540 rt_sigaction(SIGRTMIN, {0xff970ac, [], 0}, NULL, 8) = 0 rt_sigaction(SIGRT_1, {0xff97128, [], 0}, NULL, 8) = 0 rt_sigaction(SIGRT_2, {0xff97230, [], 0}, NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [RTMIN], NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [RT_1], NULL, 8) = 0 _sysctl({{CTL_KERN, KERN_VERSION}, 2, 0x7f955550, 31, (nil), 0}) = 0 brk(0) = 0x10022000 brk(0x10043000) = 0x10043000 brk(0) = 0x10043000 stat("/sbin/java", 0x7f9545f0) = -1 ENOENT (No such file or directory) stat("/bin/java", 0x7f9545f0) = -1 ENOENT (No such file or directory) stat("/usr/sbin/java", 0x7f9545f0) = -1 ENOENT (No such file or directory) stat("/usr/bin/java", {st_mode=S_IFREG|0755, st_size=80258, ...}) = 0 readlink("/usr/bin/java", "/etc/alternatives/java", 4096) = 22 readlink("/etc/alternatives", 0x7f953648, 4096) = -1 EINVAL (Invalid argument) readlink("/etc", 0x7f953648, 4096) = -1 EINVAL (Invalid argument) stat("/etc/jre/bin/j9vm/libjvm.so", 0x7f954620) = -1 ENOENT (No such file or directory) stat("/etc/bin/j9vm/libjvm.so", 0x7f954620) = -1 ENOENT (No such file or directory) stat("/etc/jre/bin/libjvm.so", 0x7f954620) = -1 ENOENT (No such file or directory) stat("/etc/bin/libjvm.so", 0x7f954620) = -1 ENOENT (No such file or directory) stat("/etc/jre/bin/classic/libjvm.so", 0x7f954620) = -1 ENOENT (No such file ordirectory) stat("/etc/bin/classic/libjvm.so", 0x7f954620) = -1 ENOENT (No such file or directory) open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=4544944, ...}) = 0 mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0x30027000 mmap2(NULL, 217088, PROT_READ, MAP_PRIVATE, 3, 0x421) = 0x30227000 close(3) = 0 access("/etc/alternatives/launcher_zh_CN.properties", R_OK) = -1 ENOENT (No such file or directory) access("/etc/alternatives/launcher_zh.properties", R_OK) = -1 ENOENT (No such file or directory) access("/etc/alternatives/launcher.properties", R_OK) = -1 ENOENT (No such fileor directory) open(umovestr: Input/output error 0, O_RDONLY) = -1 EFAULT (Bad address) open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib/gconv/gconv-modules", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=45278, ...}) = 0 ... omit some lines here .... write(2, "JVM not found: libjvm.so - libj"..., 38JVM not found: libjvm.so - libjvm.so ) = 38 write(2, "\n", 1 ) = 1 exit_group(1) = ? ~~~snip~~~ Here is my work around solution. Remove all the java stuff under /usr/bin, and re-create them. ~~~snip~~~ for f in appletviewer apt extcheck HtmlConverter idlj jar \ jarsigner java javac javadoc javah javap java-rmi.cgi \ javaw javaws jconsole jdb jdmpview keytool native2ascii \ policytool rmic rmid rmiregistry serialver tnameserv do rm /usr/bin/$f ln -s /usr/lib/j2sdk1.5-ibm/bin/$f /usr/bin/$f done ~~~snip~~~ BTW, there is a mozilla plugins in IBM Java 1.5. So you can watch java applet with mozilla or firefox. Just create the symbolic links as the following. ~~~snip~~~ ln -s /usr/lib/j2sdk1.5-ibm/jre/bin/libjavaplugin_oji.so \ /usr/lib/mozilla/plugins/ ln -s /usr/lib/j2sdk1.5-ibm/jre/bin/libjavaplugin_oji.so \ /usr/lib/mozilla-firefox/plugins/ ~~~snip~~~ > I tried with find and the file is present in the > /use/lib/j2re1.5-ibm/jre/bin/classic directory. > I also tried IBMJava 1.4.2 and got similar results. Can anyone help getting > java to life? > Best regadrs, > -- > Bartosz (Bazant) Sokolowski > PegasosII G4/1000 powered by Radeon8500 > MOS, Debian & MOL user Have fun :) -- Regards, Gong Jie (龚颉) Email: [EMAIL PROTECTED]