JDK-4876186 : Error: could not find libjava.so on SuSe 8.2
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.4.2
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: linux
  • CPU: x86
  • Submitted: 2003-06-09
  • Updated: 2003-06-18
  • Resolved: 2003-06-18
Description
Name: rmT116609			Date: 06/09/2003


FULL PRODUCT VERSION :
1.4.2-beta

FULL OS VERSION :
Linux stagingbox3 2.4.20-4GB #1 Wed Apr 16 14:50:03 UTC 2003 i586 unknown unknown GNU/Linux

EXTRA RELEVANT SYSTEM CONFIGURATION :
Vanilla SuSe 8.2 install

A DESCRIPTION OF THE PROBLEM :
I installed off of the self-extracting RPM from your site to find that I'm not able to use the 'java' binary without setting a path or symbolic link. When I do that, now I get a:

Error: could not find libjava.so
Error: could not find Java 2 Runtime Environment.

This is all from the default installation path of /usr/java/j2re1.4.2

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Install java runtime environment 1.4.2-beta from the self-extracting rpm on a vanilla installation of SuSe 8.2. Try to use the 'java' binary. Make a sym-link and try to use it after that.

EXPECTED VERSUS ACTUAL BEHAVIOR :
ACTUAL -
Error: could not find libjava.so
Error: could not find Java 2 Runtime Environment.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Error: could not find libjava.so
Error: could not find Java 2 Runtime Environment.

REPRODUCIBILITY :
This bug can be reproduced always.
(Review ID: 187441) 
======================================================================

Comments
EVALUATION The customer is seeing this error because he created a hard link from "/usr/java/j2re1.4.2/bin/java" to "/usr/bin/java". Java launcher assumes the launcher (i.e. bin/java) is located inside JDK/JRE directory. If it's copied or hard-linked to some other directory, then the launcher can't set up proper library path, and the "could not find libjava.so" error will occur. If you need to link java launcher in some directory, use symbolic link. For example, "ln -s /usr/java/j2re1.4.2/bin/java /usr/bin/java" will work fine (don't forget "-s"). ###@###.### 2003-06-18
18-06-2003