Daemon News Ezine BSD News BSD Mall BSD Support Forum BSD Advocacy BSD Updates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What creates java links in /usr/local/bin?



On Thu, Dec 22, 2005 at 11:15:58AM -0600, Thomas T. Veldhouse wrote:
> What process is creating the links to the JDK in /usr/local/bin?  I have 
> both JDK1.4 and JDK1.5 installed (both native), and the links all 
> currently point to 1.4.  Is there a utility that will relink to the 1.5 
> binaries, or will I have to do this manually?

No, the links should not point to 1.4 binaries. They should all point to
/usr/local/bin/javavm. Actually this is a feature provided by
javavmwrapper. See javavm(1) for further information.

If you want to be able to use Java 1.5 via /usr/local/bin/java, you may
either:

Set JAVA_HOME to /usr/local/jdk1.5.0:

  $ JAVA_HOME=/usrl/local/jdk1.5.0 java -version

  java version "1.5.0-p2"

Or unset JAVA_HOME and set JAVA_VERSION to 1.5:

  $ unset JAVA_HOME ; JAVA_VERSION=1.5 java -version

  java version "1.5.0-p2"

If you want 1.5 to become the default JDK for all users in the system,
just set this in /etc/make.conf:

  JAVA_PREFERRED_PORTS=	JAVA_PORT_NATIVE_BSDJAVA_JDK_1_5

Herve