LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   java setiing path (https://www.linuxquestions.org/questions/linux-newbie-8/java-setiing-path-680963/)

tahasharif2000 11-04-2008 12:07 AM

java setiing path
 
hiii hw can i set the path in linux..

murugesan 11-04-2008 01:09 AM

Quote:

Originally Posted by tahasharif2000 (Post 3330934)
hiii hw can i set the path in linux..

Type the following command in the terminal:

which java

If this command shows the output as:
/usr/bin/java
Then execute the following command:
export PATH="/usr/bin/:$PATH"

#######################################
To check whether j2sdk (for java) is installed in the linux machine, type the following command:
rpm -qal | grep j2sdk | grep -v jre| egrep "\/java$"

If the rpm command shows the following output:
/usr/java/j2sdk1.4.2_07/bin/java
then execute the following command:
export PATH="/usr/java/j2sdk1.4.2_07/bin/:$PATH"


All times are GMT -5. The time now is 01:42 AM.