Classpath of jdk1.4 with Linux
1 posts in topic
Flat View  Flat View

Posted By:   Rajneet_Singh
Posted On:   Tuesday, November 25, 2003 04:47 AM

I have downloaded jdk1.4 on my Linux RedHat9 machine. Now I want to set the classpath. Please give me detailed answer (if possible with example) so that I can set this classpath and fix all the problems.
Rajneet S

Re: Classpath of jdk1.4 with Linux

Posted By:   Stephen_McConnell  
Posted On:   Tuesday, November 25, 2003 07:10 AM

You have to set the environmental variable CLASSPATH somewhere. If you want it set the same for all users, then you can set it in the "/etc/profile" file (most Linux implementations use this). In Gentoo Linux there is a file called "/etc/provile.env" that holds the environmental variables and is loaded by the "/etc/profile" file on boot-up.

If you set the class path in your "/etc/profile" file and don't want to reboot, then do a "source /etc/profile" at the command line.

One you have set your basic CLASSPATH in that file, you can modify that class path in any program that you execute. Usually you are going to run a shell script to start your java programs, so you can modify it there.... like this.

CLASSPATH="path you want":$CLASSPATH;

Or check with whatever shell script syntax you are running...

Hope this helps...

Stephen McConnell

About | Sitemap | Contact