PDA

View Full Version : java class-path setting



aowlad
July 13th, 2010, 05:41 AM
I am new in ubuntu. I am facing this problem below.
Error: JAVA_HOME is not defined correctly.
We cannot execute /usr/local/jdk/bin/java
THERE are problem in JAVA_HOME class path.how can I solve it?

please help me

lkjoel
July 18th, 2010, 07:53 PM
I am new in ubuntu. I am facing this problem below.
Error: JAVA_HOME is not defined correctly.
We cannot execute /usr/local/jdk/bin/java
THERE are problem in JAVA_HOME class path.how can I solve it?

please help me
Could you show the output of this command for me?
And it would be helpful to use code tags when you display the results.

cat ~/.bashrc

Rushyang
August 10th, 2010, 07:03 PM
I'm not sure but you export that java dir path into your env variables through terminal.


export PATH="$PATH:usr/local/jdk/bin/java"

may that will help you to compile your progs through javac command and execute them.

KdotJ
August 10th, 2010, 09:25 PM
You will need to add the java jdk path to your PATH by adding it to your .bashrc file (or .bash_profile). I'm pretty sure the command given in the post above will work too.

However, how did you install your jdk? If you installed the openJDK via the terminal (or synaptic) it will update the PATH for you.


sudo apt-get install openjdk-6-jdk