LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   java path,classpath problem on ubuntu 9 (https://www.linuxquestions.org/questions/ubuntu-63/java-path-classpath-problem-on-ubuntu-9-a-746714/)

n3mbers 08-11-2009 07:15 AM

java path,classpath problem on ubuntu 9
 
Hi i have just upgraded my linux distro to ubuntu 9 x64. I have installed and unzipped my jave jdk and jre in my /usr/local/jdk1.6.0_14 and /usr/local/jre1.6.0_14. I have added the following lines to my bash.rc file
set JAVA_HOME=/usr/local/jdk1.6.0_14
export JAVA_HOME=/usr/local/jdk1.6.0_14
export $PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:/usr/local/jdk1.6.0_14/lib/tools.jar:/usr/local/jre1.6.0_14/lib/rt.jar

now when i reboot i get the follwoing message
export /usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/bin:usr/games:usr/local/jdk1.6.0_14/bin ': not a valid indentifier

If i type echo $JAVA_HOME i get the correct path output however if i type java -version i get an eror message saying that jave can be found in one of the following packages

Can anyone guide me please as to what i have done wrong. With regards to the jre do i also need to have my jre set to as my java-home variable is set?

joel2001k 08-16-2009 06:13 AM

hi

I've also java installed below is my file '/etc/profile' hope it helps

Code:

JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.13
export JAVA_HOME

CLASSPATH=.:$JAVA_HOME/lib:/usr/share/java/jdom1.jar:/usr/share/java/servlet-api.jar
export CLASSPATH



All times are GMT -5. The time now is 12:27 AM.