JAVA_HOME defined but maven2 compains it could not find it
mightydreams at gmail.com
Fri Oct 22 14:15:27 UTC 2010
On Fri, Oct 22, 2010 at 7:12 PM, Alan Pope <alan at popey.com> wrote:
> On 22 October 2010 14:27, Tapas Mishra <mightydreams at gmail.com> wrote:
>> not java defined in $JAVA_HOME/bin.java
> /usr/bin/java is almost certainly a symbolic link...
> alan at hactar:~$ ls -l /usr/bin/java
> lrwxrwxrwx 1 root root 22 2010-02-07 14:17 /usr/bin/java ->
> Which in my case leads me to this location..
> alan at hactar:~$ ls -l /etc/alternatives/java
> lrwxrwxrwx 1 root root 40 2010-02-07 14:17 /etc/alternatives/java ->
> To modify yours I recommend reading this page:-
> https://help.ubuntu.com/community/Java -> "Choosing the default Java to use"
Ok I read the link you gave and also man page of update-alternatives
excerpts from your link
"update-alternatives --config java"
I could not understand how to do so.
My usual way to do so would be to add $JAVA_HOME before /usr/bin in
$PATH in /etc/profile
but I feel there should be an elegant way to do so.
I have created a symbolic link so now
ls -l /usr/bin/java
lrwxrwxrwx 1 root root 41 2010-10-20 16:36 /usr/bin/java ->
is this correct.
More information about the ubuntu-users