2

I am trying to setup Apache-James Server on Ubuntu, in which I am getting the annoying error:

JAVA_HOME not defined correctly

We cannot execute

I have already referred to the documentations and set up the PATH and JAVA_HOME variables correctly in the /etc/profile file. Upon calling echo, I get the values in the output screen. Where am I missing?

echo $JAVA_HOME
/usr/local/jdk1.6.0_27
echo $PATH
$PATH:/usr/local/jdk1.6.0_27/bin

Please Help !!

1
  • I'm getting the same error trying to run maven on ubuntu. Does that jdk path exist on your machine? If you are running a command line, does using sudo help?
    – jyoungdev
    Apr 1, 2012 at 12:32

1 Answer 1

4

If you want to set JAVA_HOME correctly,

Go into your terminal and type this :

whereis java

That will give you the path of the java installation then :

gedit /etc/bash.bashrc

(I'm using sun) add at the end of the file

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

Now you 've only have to reboot.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .