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
[EMAIL PROTECTED] |   Micro$oft free world  | www.bafug.org

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to