Tuesday, March 29, 2005

HowTo Java-5: Set...Set....Set...Classpath

**To find whether u have java in ur system or not:
%which java
/usr/bin/java

**To see which version of java is in ur system:
%java -version
java version "1.2.2"
Solaris VM (build Solaris_JDK_1.2.2_10, native threads, sunwjit)


**To check your CLASSPATH:
Use the command "echo $CLASSPATH" on the command line.

**Hey In my case no classpath is not showing while typing the command....But program is running.
K..No problem.U can export classpath each time

export CLASSPATH=$CLASSPATH:/path/to/program

**I want to do it permanently

Like in case of Windows,In unix u can do it by editing .profile or .bashprofile or .cshrc

just add this line

export CLASSPATH=/usr/local/jre1.3.1/bin [check the path for urs sys]

Labels:

0 Comments:

Post a Comment

<< Home