Hi Fredrik,

Did you restart your computer or run the command, ". ~/.bashrc"?

If so, it's hardly possible. Remember to check there is no JAVA_HOME in
.bash_profile. Or show the content of .bashrc and .bash_profile in the
mail.

I still recommend you, use the standard JDK rather than openJdk.

By the way, Fedora 16 is very cool.


Thanks,
Diego



-----Original Message-----
From: fredand44 [mailto:[email protected]] 
Sent: Wednesday, 14 December 2011 14:56
To: [email protected]
Subject: How to set JAVA_HOME for maven?

Hello!

I have just reinstalled my computer to Ubuntu.
I have also installed maven 3.0.3..

I set JAVA_HOME in my .bashrc like:

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

If I print it out with printenv I get:
JAVA_HOME=/usr/lib/jvm/java-6-openjdk

But If I run mvn --version I get:

mvn --version
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100) Maven home:
/home/fredrik/Applications/apache-maven-3.0.3
Java version: 1.6.0_23, vendor: Sun Microsystems Inc.
*Java home: /usr/lib/jvm/java-6-openjdk/jre* Default locale: en_US,
platform encoding: UTF-8 OS name: "linux", version: "3.0.0-14-generic",
arch: "i386", family: "unix"


As you can see it points to the JRE, and I guess that is not right.
(I got the same when I did not set any JAVA_HOME also)

What do you think guys?

Best regards
Fredrik





--
View this message in context:
http://maven.40175.n5.nabble.com/How-to-set-JAVA-HOME-for-maven-tp507369
5p5073695.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to