JAVA_HOME

Colin Law clanlaw at googlemail.com
Fri Aug 17 16:07:21 UTC 2012


On 17 August 2012 16:39, Markus Schönhaber
<ubuntu-users at list-post.mks-mail.de> wrote:
> 17.08.2012 17:14, Colin Law:
>
>> On 17 August 2012 10:14, Thufir <hawat.thufir at gmail.com> wrote:
>>> What's the deal, haven't I set JAVA_HOME correctly?
>>>
>>> thufir at dur:~$
>>> thufir at dur:~$ sudo Desktop/james-2.3.2/bin/run.sh
>>> ERROR: JAVA_HOME not found in your environment.
>>>
>>> Please, set the JAVA_HOME variable in your environment to match the
>>> location of the Java Virtual Machine you want to use.
>>> thufir at dur:~$
>>> thufir at dur:~$ echo $JAVA_HOME
>>
>> Try sudo echo $JAVA_HOME
>
> Why?

Because then you will learn a lot because someone will point out how
stupid you are to even try that.

To the OP,
sudo sh -c 'echo $JAVA_HOME'
might be more informative.  Or am I still being stupid?

Colin

> That will show the same as
> echo $JAVA_HOME
> since bash will apply variable expansion before it calls sudo.




More information about the ubuntu-users mailing list