JAVA_HOME defined but maven2 compains it could not find it

Colin Law clanlaw at googlemail.com
Fri Oct 22 14:27:32 UTC 2010


On 22 October 2010 15:15, Tapas Mishra <mightydreams at gmail.com> wrote:
> 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:
>>> /usr/bin/java
>>> 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 ->
>> /etc/alternatives/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 ->
>> /usr/lib/jvm/java-6-openjdk/jre/bin/java
>>
>> To modify yours I recommend reading this page:-
>>
>> https://help.ubuntu.com/community/Java -> "Choosing the default Java to use"
>>
>> Cheers,
>> Al.
>>
> 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 ->
> /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java
> is this correct.

I don't understand why you need to change any of this.  What are you
trying to accomplish?

Colin




More information about the ubuntu-users mailing list