Kbase P98596: libgcj-java-placeholder.sh error when querying the java version
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/4/2005 |
|
Status: Unverified
SYMPTOM(s):
Error when querying the Java version using the command "java -version"
libgcj-java-placeholder.sh
This script is a placeholder for the /usr/bin/java and /usr/bin/javac master links required by jpackage.org conventions. libgcj's rmiregistry, rmic and jar tools are now slave symlinks to these masters, and are managed by the alternatives(8) system. This change was necessary because the rmiregistry, rmic and jar tools installed by previous versions of libgcj conflicted with symlinks installed by jpackage.org JVM packages
Using the full path of the Java executable works fine i.e., for example:
/usr/java/jdk1.3.1/bin/java -version
CAUSE:
The correct version of Java is not picked up by the operating system because the PATH environment variable misses its location
FIX:
Add the correct JDK bin location to the PATH variable.
For example if you are using a Java JDK in this location: /usr/java/jdk1.3.1/, add "/usr/java/jdk1.3.1/bin" to the PATH by using the command:
export PATH=$PATH:/usr/java/jdk1.3.1/bin
that will add the path to $PATH for that session on that virtual terminal only.
To make it permanent put that exact line in ~/.bash_profile:
code:JAVA_HOME=/usr/java/jdk1.3.1
PATH=${JAVA_HOME}/bin:$PATH
export PATH