Operating System - HP-UX
1827452 Members
5177 Online
109965 Solutions
New Discussion

JAVA Environment Settings

 
Peter Kolenciak
New Member

JAVA Environment Settings

What is the format for CLASSPATH env variable?
3 REPLIES 3
Sridhar Bhaskarla
Honored Contributor

Re: JAVA Environment Settings

It is the same format that PATH variable uses.

CLASSPATH=$CLASSPATH:dir1:dir2:dir3
export CLASSPATH

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Jeff Schussele
Honored Contributor

Re: JAVA Environment Settings

Hi Peter,

At a minimum it should look something like:

CLASSPATH=/path/to/file.jar

OR a more advanced definition would look like:

CLASSPATH=${CLASSPATH}:${JAVA_HOME}/jre/lib/ext/jsse.jar

Of course you should have JAVA_HOME defined prior to this definition

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Sridhar Bhaskarla
Honored Contributor

Re: JAVA Environment Settings

Hi (again),

It is not necessary that only directories are to be listed in the CLASSPATH, it could be archives (zip or jar files).

You can include it in your .profile or .cshrc.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try