This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Classpath" Watch "Classpath" New topic


Dirk Trompetter

Joined: Aug 21, 2001
Posts: 13
how can i set the java classpath on linux?
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

It's right here in the tooldocs...

Basically, all you have to do is :

[This message has been edited by Nathan Pruett (edited October 15, 2001).]

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
kim jungil

Joined: Sep 27, 2001
Posts: 27
Originally posted by Dirk Trompetter:
how can i set the java classpath on linux?

under linux, if you install jdk under /usr/jdk1.3, then export /usr/jdk1.3 to system variable PATH to enable java, javac to run.
For classpath, export those package your are going to use to system variable CLASSPATH will be enough.
In most of the case, it is good to include . and .. in the CLASSPATH, this is to notice the JRE to find in the current directory and its parent directory.
Kem Bro

Joined: Oct 17, 2001
Posts: 25
I'm not sure what shell you run, but I set my CLASSPATH
variable in the .bashrc in my home directory. Handy also to
set JAVA_HOME here. Take a look, there should be other
examples in there aswell.
I agree. Here's the link:
subject: Classpath
It's not a secret anymore!