amit4444
amit4444

Reputation: 21

JAVA_HOME in Ubuntu

i have installed jdk1.6 with netbeans 6.9 in my ubuntu10.10 it works fine ,i then try eclipse but it shows me the jdk or jre kit must be available to run eclipse. i set JAVA_HOME AND PATH IN MY /etc/enviroment file

`PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr`/games:$PATH:$JAVA_HOME:$JAVA_HOME/bin"

JAVA_HOME="/home/amit/jdk1.6.0_24"
CLASSPATH="/home/amit/jdk1.6.0_24/lib:."

but it doesn,t work java -version command did not work echo $java _ home works i also restart my pc. i also change it

JAVA_HOME="/home/amit/jdk1.6.0_24"
`PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr`/games:$PATH:$JAVA_HOME:$JAVA_HOME/bin"

CLASSPATH="/home/amit/jdk1.6.0_24/lib:."

but it still did not work thanks in advance

Upvotes: 2

Views: 1241

Answers (2)

user unknown
user unknown

Reputation: 36269

echo $java _ home 

is wrong.

  • blanks aren't optional
  • we are case-sensitive

    echo $JAVA_HOME

is the right way.

Upvotes: 1

You need to have the definition of JAVA_HOME before the defintion of PATH. The expansion needs to take place at definition time, else it looks for the folder named "$JAVA_HOME" which you probably do not have.

Upvotes: 3

Related Questions