JAVA_HOME defined but maven2 compains it could not find it

Tapas Mishra mightydreams at gmail.com
Fri Oct 22 13:27:31 UTC 2010


On Fri, Oct 22, 2010 at 5:57 PM, Alan Pope <alan at popey.com> wrote:
> On 22 October 2010 12:52, Tapas Mishra <mightydreams at gmail.com> wrote:
>> JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.20/bin"
>> export JAVA_HOME
>>
>
> That's wrong. It should point to the directory _above_ bin, not bin itself.
>
>> Error: JAVA_HOME is not defined correctly.
>
> ^^ this error is correct.
>
>>  We cannot execute /usr/lib/jvm/java-6-sun-1.6.0.20/bin/bin/java
>>
>
> ^^ Observe the "/bin/bin/java" on the end of that. That's because you
> specified the trailing /bin in your JAVA_HOME.
>
> Al.
>
Ok I removed bin  and the things seem to work now.
But when I do
which java the output is

/usr/bin/java
not java defined in  $JAVA_HOME/bin.java




More information about the ubuntu-users mailing list