Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Oct 2002 12:22:23 -0700
From:      Josef Grosch <jgrosch@mooseriver.com>
To:        Matt Smith <matt@forsetti.com>
Cc:        MET <met@uberstats.com>, freebsd-questions@FreeBSD.ORG
Subject:   Re: JDK13
Message-ID:  <20021002192223.GA7293@mooseriver.com>
In-Reply-To: <1033581828.4785.9.camel@localhost>
References:  <000101c26a39$4482ad10$0200a8c0@SURVIVAL> <1033581828.4785.9.camel@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 02, 2002 at 02:03:48PM -0400, Matt Smith wrote:
> either add /usr/local/jdk1.3.1/bin/ to your PATH, or simply make
> soft-links (or hard links, at your preference):
> 
> ln -s /usr/local/jdk1.3.1/bin/java /usr/local/bin/java
> 
> HOWEVER, I believe (from my minimal Java experience) that the Java
> utilities will look for CLASS_PATHs and other java "Stuff" relative to
> location of java binaries.  Executing via link from another location
> (like /usr/local/bin) may cause issues.
> But again, my Java experience is minimal, and I may be waaay off. 
> Perhaps someone on this list can clarify?
> -Matt

You are almost there. The environment variable, CLASSPATH, contains a list
of directories and Jars that contain java classes. For example in my
.bashrc I have the following;

export JAVA_HOME=/usr/local/jdk1.3.1
CLASSPATH=.:$JAVA_HOME
CLASSPATH=$CLASSPATH:$JAVA_HOME/bin
CLASSPATH=$CLASSPATH:/usr/local/share/java/classes/crimson.jar
CLASSPATH=$CLASSPATH:/usr/local/share/java/classes/postgresql.jar
CLASSPATH=$CLASSPATH:/usr2/home/jgrosch/MooseRiver/Java/Classes/mooseriver.jar
CLASSPATH=$CLASSPATH:/usr/local/jakarta-tomcat3.3.1/lib/common/servlet.jar
export CLASSPATH

There needs to be an environment variable, JAVA_HOME which points to
/usr/local/jdk1.3.1. Of course, /usr/local/jdk1.3.1/bin needs to be in the 
environment variable, PATH. 
 
Hope this helps.


Josef

-- 
  == Copyright(c) 2002 by Josef Grosch. All rights reserved. ==
  ==                                                         ==
Josef Grosch           | Another day closer to a | FreeBSD 4.6.2
jgrosch@MooseRiver.com |   Micro$oft free world  | www.bafug.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021002192223.GA7293>