wood burning stoves*
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Classpath" Watch "Classpath" New topic
Author

Classpath

Dirk Trompetter
Greenhorn

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

Joined: Oct 18, 2000
Posts: 4121

It's right here in the tooldocs...

Basically, all you have to do is :


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


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

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

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
Greenhorn

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.
Cheers.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Classpath
 
Similar Threads
class 1
Compiling, but not running !!!
how to use ClassLoader ???
Running application from command mode (MS DOS WINDOW)
Web Application Architecture