LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to set classpath for java (https://www.linuxquestions.org/questions/linux-software-2/how-to-set-classpath-for-java-56247/)

jolly 04-22-2003 07:13 AM

How to set classpath for java
 
how do I setup class path for jave. I installed it by using rpm. Java is in /usr/java

Thanks

matt combe 04-22-2003 07:42 AM

if i remember correctly you jusst type into bash:
"export CLASS_PATH=$CLASS_PATH:/usr/java/(its either lib or bin im not sure -- i think bin)

but u wont b able to use the jre until u simlink it to ur browser file eg. /home/.mozilla/plugins

dfbreyes 04-22-2003 10:08 AM

let's say you downloaded j2sdk1.4.1_01 and placed it in /usr/local

#edit/ add to /root/.bash_profile

export JAVA_HOME=/usr/local/j2sdk1.4.1_01
export PATH=$PATH:${JAVA_HOME}/bin

to check version
java -version

homyarb 04-22-2003 10:02 PM

You can also set the java classpath at runtime with the -c option of java.
java -c <Path to class/jar/zip files to be included i nthe classpath> <java class name to be run>


All times are GMT -5. The time now is 08:16 AM.