JAVA_HOME defined but maven2 compains it could not find it
mightydreams at gmail.com
Fri Oct 22 16:04:12 UTC 2010
On Fri, Oct 22, 2010 at 8:04 PM, Alan Pope <alan at popey.com> wrote:
> On 22 October 2010 15:15, Tapas Mishra <mightydreams at gmail.com> wrote:
>> 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.
> I don't think you needed to update anything. /usr/bin/java points to
No this is not the case.
>which (probably) points to
> /usr/lib/jvm/java-6-sun-22.214.171.124/bin/java, if it doesn't then you
> follow the steps. E.g.
> First list the java packages installed..
> alan at hactar:~$ sudo update-java-alternatives -l
> java-6-openjdk 1061 /usr/lib/jvm/java-6-openjdk
This gives me only one output
java-6-sun 63 /usr/lib/jvm/java-6-sun
does that mean I have only one Java installed.
> (I only have one)
> Then point java alternatives to it.
> alan at hactar:~$ sudo update-java-alternatives -s java-6-openjdk
> Doing a direct link from /usr/bin/java to somewhere will work, but
> possibly break when a different version of java is installed later.
More information about the ubuntu-users