You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by zander1013 <za...@gmail.com> on 2009/01/30 22:49:01 UTC

settin JAVA_HOME...

hi,

i am new to hadoop. i am trying to set it up for the first time as a single
node cluster. at present the snag is that i cannot seem to find the correct
path for setting the JAVA_HOME variable.

i am using ubuntu 8.10. i have tried using "whereis java" and tried setting
the variable to point to those places (except the dir where i have hadoop).

please advise.

-zander
-- 
View this message in context: http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756240.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.


Re: settin JAVA_HOME...

Posted by zander1013 <za...@gmail.com>.
yes i am trying to locate java's location on  my machine... i installed
sun-java6-jre using the synaptic package manager...

here is the output from the tutorial after i tried to locate java using
"which java" "ls..." etc and put that into the .sh file...

af@node0:~/Hadoop/hadoop-0.19.0$ bin/hadoop jar hadoop-*-examples.jar grep
input output 'dfs[a-z.]+'
bin/hadoop: line 243: /etc/alternatives/java/bin/java: Not a directory
bin/hadoop: line 273: /etc/alternatives/java/bin/java: Not a directory
bin/hadoop: line 273: exec: /etc/alternatives/java/bin/java: cannot execute:
Not a directory
af@node0:~/Hadoop/hadoop-0.19.0$ 

please advise.


Bill Au wrote:
> 
> You actually have to set JAVA_HOME to where Java is actually installed on
> your system.  "/usr/lib/jvm/default-java" is just an example.  The error
> messages indicate that that's not where Java is installed on your system.
> 
> Bill
> 
> On Fri, Jan 30, 2009 at 5:09 PM, zander1013 <za...@gmail.com> wrote:
> 
>>
>> okay,
>>
>> here is the section for conf/hadoop-env.sh...
>>
>> # Set Hadoop-specific environment variables here.
>>
>> # The only required environment variable is JAVA_HOME.  All others are
>> # optional.  When running a distributed configuration it is best to
>> # set JAVA_HOME in this file, so that it is correctly defined on
>> # remote nodes.
>>
>> # The java implementation to use.  Required.
>> # export JAVA_HOME=/usr/lib/j2sdk1.5-sun
>> export JAVA_HOME=/usr/lib/jvm/default-java
>>
>> ...
>>
>> and here is what i got for output. i am trying to go through the tutorial
>> at
>> http://hadoop.apache.org/core/docs/current/quickstart.html
>>
>> here is the output...
>>
>> af@node0:~/Hadoop/hadoop-0.19.0$ bin/hadoop jar hadoop-*-examples.jar
>> grep
>> input output 'dfs[a-z.]+'
>> bin/hadoop: line 243: /usr/lib/jvm/default-java/bin/java: No such file or
>> directory
>> bin/hadoop: line 273: /usr/lib/jvm/default-java/bin/java: No such file or
>> directory
>> bin/hadoop: line 273: exec: /usr/lib/jvm/default-java/bin/java: cannot
>> execute: No such file or directory
>> af@node0:~/Hadoop/hadoop-0.19.0$
>>
>> ...
>>
>> please advise...
>>
>>
>>
>>
>> Mark Kerzner-2 wrote:
>> >
>> > You set it in the conf/hadoop-env.sh file, with an entry like this
>> > export JAVA_HOME=/usr/lib/jvm/default-java
>> >
>> > Mark
>> >
>> > On Fri, Jan 30, 2009 at 3:49 PM, zander1013 <za...@gmail.com>
>> wrote:
>> >
>> >>
>> >> hi,
>> >>
>> >> i am new to hadoop. i am trying to set it up for the first time as a
>> >> single
>> >> node cluster. at present the snag is that i cannot seem to find the
>> >> correct
>> >> path for setting the JAVA_HOME variable.
>> >>
>> >> i am using ubuntu 8.10. i have tried using "whereis java" and tried
>> >> setting
>> >> the variable to point to those places (except the dir where i have
>> >> hadoop).
>> >>
>> >> please advise.
>> >>
>> >> -zander
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756240.html
>> >> Sent from the Hadoop core-user mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756569.html
>> Sent from the Hadoop core-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756798.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.


Re: settin JAVA_HOME...

Posted by Bill Au <bi...@gmail.com>.
You actually have to set JAVA_HOME to where Java is actually installed on
your system.  "/usr/lib/jvm/default-java" is just an example.  The error
messages indicate that that's not where Java is installed on your system.

Bill

On Fri, Jan 30, 2009 at 5:09 PM, zander1013 <za...@gmail.com> wrote:

>
> okay,
>
> here is the section for conf/hadoop-env.sh...
>
> # Set Hadoop-specific environment variables here.
>
> # The only required environment variable is JAVA_HOME.  All others are
> # optional.  When running a distributed configuration it is best to
> # set JAVA_HOME in this file, so that it is correctly defined on
> # remote nodes.
>
> # The java implementation to use.  Required.
> # export JAVA_HOME=/usr/lib/j2sdk1.5-sun
> export JAVA_HOME=/usr/lib/jvm/default-java
>
> ...
>
> and here is what i got for output. i am trying to go through the tutorial
> at
> http://hadoop.apache.org/core/docs/current/quickstart.html
>
> here is the output...
>
> af@node0:~/Hadoop/hadoop-0.19.0$ bin/hadoop jar hadoop-*-examples.jar grep
> input output 'dfs[a-z.]+'
> bin/hadoop: line 243: /usr/lib/jvm/default-java/bin/java: No such file or
> directory
> bin/hadoop: line 273: /usr/lib/jvm/default-java/bin/java: No such file or
> directory
> bin/hadoop: line 273: exec: /usr/lib/jvm/default-java/bin/java: cannot
> execute: No such file or directory
> af@node0:~/Hadoop/hadoop-0.19.0$
>
> ...
>
> please advise...
>
>
>
>
> Mark Kerzner-2 wrote:
> >
> > You set it in the conf/hadoop-env.sh file, with an entry like this
> > export JAVA_HOME=/usr/lib/jvm/default-java
> >
> > Mark
> >
> > On Fri, Jan 30, 2009 at 3:49 PM, zander1013 <za...@gmail.com>
> wrote:
> >
> >>
> >> hi,
> >>
> >> i am new to hadoop. i am trying to set it up for the first time as a
> >> single
> >> node cluster. at present the snag is that i cannot seem to find the
> >> correct
> >> path for setting the JAVA_HOME variable.
> >>
> >> i am using ubuntu 8.10. i have tried using "whereis java" and tried
> >> setting
> >> the variable to point to those places (except the dir where i have
> >> hadoop).
> >>
> >> please advise.
> >>
> >> -zander
> >> --
> >> View this message in context:
> >> http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756240.html
> >> Sent from the Hadoop core-user mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756569.html
> Sent from the Hadoop core-user mailing list archive at Nabble.com.
>
>

Re: settin JAVA_HOME...

Posted by Sandy <sn...@gmail.com>.
It's exactly as Steve says. Sorry, I should have been clearer in my last
e-mail. I have had really bad experiences with any other jdk (the default on
ubuntu, gcj, etc) than Sun's. So it may be easier to do that.

To stop all hadoop processes use:
bin/stop-all.sh

To start them, use:
bin/start-all.sh

Whenever you make a change in your conf/hadoop-env.sh or
conf/hadoop-site.xml files, you will need to restart hadoop using the above
two scripts.

All the best,

-SM

On Mon, Feb 2, 2009 at 4:40 AM, Steve Loughran <st...@apache.org> wrote:

> haizhou zhao wrote:
>
>> hi Sandy,
>> Every time I change the conf, i have to do the following to things:
>> 1. kill all hadoop processes
>> 2. manually delelte all the file under hadoop.tmp.dir
>> to make sure hadoop runs correctly, otherwise it wont work.
>>
>> Is this cause'd by my using a JDK instead of sun java?
>>
>
>
> No, you need to do that to get configuration changes picked up. There are
> scripts in hadoop/bin to help you
>
>  and what do you mean
>> by "sun-java", please?
>>
>
>
> Sandy means
>
> * sun-java6-jdk: Sun's released JDK
> * default-jdk ubuntu chooses. On 8.10, it is open-jdk
> * open-jdk-6-jdk: the full open source version of the JDK. Worse font
> rendering code, but comes with more source
>
> Others
> * Oracle JRockit: good 64-bit memory management, based on the sun JDK
> unsupported
> * IBM JVM unsupported. Based on the sun JDK
> * Apache Harmony: clean room rewrite of everything. unsupported
> * Kaffe. unsupported
> * Gcj. unsupported
>
> type java -version to get your java version
>
>
> Sun
>
> java version "1.6.0_10"
> Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
> Java HotSpot(TM) Server VM (buld 11.0-b14, mixed mode
>
> JRockit:
>
> java version "1.6.0_02"
> Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
> BEA JRockit(R) (build R27.4.0-90-89592-1.6.0_02-20070928-1715-linux-x86_64,
> compiled mode)
>
>
>
>
>
>
>
>
>> 2009/1/31 Sandy <sn...@gmail.com>
>>
>>  Hi Zander,
>>>
>>> Do not use jdk. Horrific things happen. You must use sun java in order to
>>> use hadoop.
>>>
>>
>
>

Re: settin JAVA_HOME...

Posted by Steve Loughran <st...@apache.org>.
haizhou zhao wrote:
> hi Sandy,
> Every time I change the conf, i have to do the following to things:
> 1. kill all hadoop processes
> 2. manually delelte all the file under hadoop.tmp.dir
> to make sure hadoop runs correctly, otherwise it wont work.
> 
> Is this cause'd by my using a JDK instead of sun java? 


No, you need to do that to get configuration changes picked up. There 
are scripts in hadoop/bin to help you

>and what do you mean
> by "sun-java", please?


Sandy means

* sun-java6-jdk: Sun's released JDK
* default-jdk ubuntu chooses. On 8.10, it is open-jdk
* open-jdk-6-jdk: the full open source version of the JDK. Worse font 
rendering code, but comes with more source

Others
* Oracle JRockit: good 64-bit memory management, based on the sun JDK 
unsupported
* IBM JVM unsupported. Based on the sun JDK
* Apache Harmony: clean room rewrite of everything. unsupported
* Kaffe. unsupported
* Gcj. unsupported

type java -version to get your java version


Sun

java version "1.6.0_10"
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Java HotSpot(TM) Server VM (buld 11.0-b14, mixed mode

JRockit:

java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
BEA JRockit(R) (build 
R27.4.0-90-89592-1.6.0_02-20070928-1715-linux-x86_64, compiled mode)






> 
> 2009/1/31 Sandy <sn...@gmail.com>
> 
>> Hi Zander,
>>
>> Do not use jdk. Horrific things happen. You must use sun java in order to
>> use hadoop.



Re: settin JAVA_HOME...

Posted by haizhou zhao <ra...@gmail.com>.
hi Sandy,
Every time I change the conf, i have to do the following to things:
1. kill all hadoop processes
2. manually delelte all the file under hadoop.tmp.dir
to make sure hadoop runs correctly, otherwise it wont work.

Is this cause'd by my using a JDK instead of sun java? and what do you mean
by "sun-java", please?

2009/1/31 Sandy <sn...@gmail.com>

> Hi Zander,
>
> Do not use jdk. Horrific things happen. You must use sun java in order to
> use hadoop.
>
> There are packages for sun java on the ubuntu repository. You can download
> these directly using apt-get. This will install java 6 on your system.
> Your JAVA_HOME line in hadoop-env.sh should look like:
> export JAVA_HOME=/usr/lib/jvm/java-6-sun
>
> Also, on the wiki, there is a guide for installing hadoop on ubuntu
> systems.
> I think you may find this helpful.
>
> http://wiki.apache.org/hadoop/Running_Hadoop_On_Ubuntu_Linux_(Single-Node_Cluster)<http://wiki.apache.org/hadoop/Running_Hadoop_On_Ubuntu_Linux_%28Single-Node_Cluster%29>
>
> All the best!
> -SM
>
>
> On Fri, Jan 30, 2009 at 4:33 PM, zander1013 <za...@gmail.com> wrote:
>
> >
> > i am installing "default-jdk" now. perhaps that was the problem. is this
> > the
> > right jdk?
> >
> >
> >
> > zander1013 wrote:
> > >
> > > cool!
> > >
> > > here is the output for those commands...
> > >
> > > af@node0:~/Hadoop/hadoop-0.19.0$ which java
> > > /usr/bin/java
> > > af@node0:~/Hadoop/hadoop-0.19.0$
> > > af@node0:~/Hadoop/hadoop-0.19.0$ ls -l /usr/bin/java
> > > lrwxrwxrwx 1 root root 22 2009-01-29 18:03 /usr/bin/java ->
> > > /etc/alternatives/java
> > > af@node0:~/Hadoop/hadoop-0.19.0$
> > >
> > > ... i will try and set JAVA_HOME=/etc/alternatives/java...
> > >
> > > thank you for helping...
> > >
> > > -zander
> > >
> > >
> > > Mark Kerzner-2 wrote:
> > >>
> > >> Oh, you have used my path to JDK, you need yours
> > >> do this
> > >>
> > >> which java
> > >> something like /usr/bin/java will come back
> > >>
> > >> then do
> > >> ls -l /usr/bin/java
> > >>
> > >> it will tell you where the link is to. There may be more redirections,
> > >> get
> > >> the real path to your JDK
> > >>
> > >> On Fri, Jan 30, 2009 at 4:09 PM, zander1013 <za...@gmail.com>
> > wrote:
> > >>
> > >>>
> > >>> okay,
> > >>>
> > >>> here is the section for conf/hadoop-env.sh...
> > >>>
> > >>> # Set Hadoop-specific environment variables here.
> > >>>
> > >>> # The only required environment variable is JAVA_HOME.  All others
> are
> > >>> # optional.  When running a distributed configuration it is best to
> > >>> # set JAVA_HOME in this file, so that it is correctly defined on
> > >>> # remote nodes.
> > >>>
> > >>> # The java implementation to use.  Required.
> > >>> # export JAVA_HOME=/usr/lib/j2sdk1.5-sun
> > >>> export JAVA_HOME=/usr/lib/jvm/default-java
> > >>>
> > >>> ...
> > >>>
> > >>> and here is what i got for output. i am trying to go through the
> > >>> tutorial
> > >>> at
> > >>> http://hadoop.apache.org/core/docs/current/quickstart.html
> > >>>
> > >>> here is the output...
> > >>>
> > >>> af@node0:~/Hadoop/hadoop-0.19.0$ bin/hadoop jar
> hadoop-*-examples.jar
> > >>> grep
> > >>> input output 'dfs[a-z.]+'
> > >>> bin/hadoop: line 243: /usr/lib/jvm/default-java/bin/java: No such
> file
> > >>> or
> > >>> directory
> > >>> bin/hadoop: line 273: /usr/lib/jvm/default-java/bin/java: No such
> file
> > >>> or
> > >>> directory
> > >>> bin/hadoop: line 273: exec: /usr/lib/jvm/default-java/bin/java:
> cannot
> > >>> execute: No such file or directory
> > >>> af@node0:~/Hadoop/hadoop-0.19.0$
> > >>>
> > >>> ...
> > >>>
> > >>> please advise...
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> Mark Kerzner-2 wrote:
> > >>> >
> > >>> > You set it in the conf/hadoop-env.sh file, with an entry like this
> > >>> > export JAVA_HOME=/usr/lib/jvm/default-java
> > >>> >
> > >>> > Mark
> > >>> >
> > >>> > On Fri, Jan 30, 2009 at 3:49 PM, zander1013 <za...@gmail.com>
> > >>> wrote:
> > >>> >
> > >>> >>
> > >>> >> hi,
> > >>> >>
> > >>> >> i am new to hadoop. i am trying to set it up for the first time as
> a
> > >>> >> single
> > >>> >> node cluster. at present the snag is that i cannot seem to find
> the
> > >>> >> correct
> > >>> >> path for setting the JAVA_HOME variable.
> > >>> >>
> > >>> >> i am using ubuntu 8.10. i have tried using "whereis java" and
> tried
> > >>> >> setting
> > >>> >> the variable to point to those places (except the dir where i have
> > >>> >> hadoop).
> > >>> >>
> > >>> >> please advise.
> > >>> >>
> > >>> >> -zander
> > >>> >> --
> > >>> >> View this message in context:
> > >>> >>
> http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756240.html
> > >>> >> Sent from the Hadoop core-user mailing list archive at Nabble.com.
> > >>> >>
> > >>> >>
> > >>> >
> > >>> >
> > >>>
> > >>> --
> > >>> View this message in context:
> > >>> http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756569.html
> > >>> Sent from the Hadoop core-user mailing list archive at Nabble.com.
> > >>>
> > >>>
> > >>
> > >>
> > >
> > >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756916.html
> > Sent from the Hadoop core-user mailing list archive at Nabble.com.
> >
> >
>

Re: settin JAVA_HOME...

Posted by Sandy <sn...@gmail.com>.
Hi Zander,

Do not use jdk. Horrific things happen. You must use sun java in order to
use hadoop.

There are packages for sun java on the ubuntu repository. You can download
these directly using apt-get. This will install java 6 on your system.
Your JAVA_HOME line in hadoop-env.sh should look like:
export JAVA_HOME=/usr/lib/jvm/java-6-sun

Also, on the wiki, there is a guide for installing hadoop on ubuntu systems.
I think you may find this helpful.
http://wiki.apache.org/hadoop/Running_Hadoop_On_Ubuntu_Linux_(Single-Node_Cluster)

All the best!
-SM


On Fri, Jan 30, 2009 at 4:33 PM, zander1013 <za...@gmail.com> wrote:

>
> i am installing "default-jdk" now. perhaps that was the problem. is this
> the
> right jdk?
>
>
>
> zander1013 wrote:
> >
> > cool!
> >
> > here is the output for those commands...
> >
> > af@node0:~/Hadoop/hadoop-0.19.0$ which java
> > /usr/bin/java
> > af@node0:~/Hadoop/hadoop-0.19.0$
> > af@node0:~/Hadoop/hadoop-0.19.0$ ls -l /usr/bin/java
> > lrwxrwxrwx 1 root root 22 2009-01-29 18:03 /usr/bin/java ->
> > /etc/alternatives/java
> > af@node0:~/Hadoop/hadoop-0.19.0$
> >
> > ... i will try and set JAVA_HOME=/etc/alternatives/java...
> >
> > thank you for helping...
> >
> > -zander
> >
> >
> > Mark Kerzner-2 wrote:
> >>
> >> Oh, you have used my path to JDK, you need yours
> >> do this
> >>
> >> which java
> >> something like /usr/bin/java will come back
> >>
> >> then do
> >> ls -l /usr/bin/java
> >>
> >> it will tell you where the link is to. There may be more redirections,
> >> get
> >> the real path to your JDK
> >>
> >> On Fri, Jan 30, 2009 at 4:09 PM, zander1013 <za...@gmail.com>
> wrote:
> >>
> >>>
> >>> okay,
> >>>
> >>> here is the section for conf/hadoop-env.sh...
> >>>
> >>> # Set Hadoop-specific environment variables here.
> >>>
> >>> # The only required environment variable is JAVA_HOME.  All others are
> >>> # optional.  When running a distributed configuration it is best to
> >>> # set JAVA_HOME in this file, so that it is correctly defined on
> >>> # remote nodes.
> >>>
> >>> # The java implementation to use.  Required.
> >>> # export JAVA_HOME=/usr/lib/j2sdk1.5-sun
> >>> export JAVA_HOME=/usr/lib/jvm/default-java
> >>>
> >>> ...
> >>>
> >>> and here is what i got for output. i am trying to go through the
> >>> tutorial
> >>> at
> >>> http://hadoop.apache.org/core/docs/current/quickstart.html
> >>>
> >>> here is the output...
> >>>
> >>> af@node0:~/Hadoop/hadoop-0.19.0$ bin/hadoop jar hadoop-*-examples.jar
> >>> grep
> >>> input output 'dfs[a-z.]+'
> >>> bin/hadoop: line 243: /usr/lib/jvm/default-java/bin/java: No such file
> >>> or
> >>> directory
> >>> bin/hadoop: line 273: /usr/lib/jvm/default-java/bin/java: No such file
> >>> or
> >>> directory
> >>> bin/hadoop: line 273: exec: /usr/lib/jvm/default-java/bin/java: cannot
> >>> execute: No such file or directory
> >>> af@node0:~/Hadoop/hadoop-0.19.0$
> >>>
> >>> ...
> >>>
> >>> please advise...
> >>>
> >>>
> >>>
> >>>
> >>> Mark Kerzner-2 wrote:
> >>> >
> >>> > You set it in the conf/hadoop-env.sh file, with an entry like this
> >>> > export JAVA_HOME=/usr/lib/jvm/default-java
> >>> >
> >>> > Mark
> >>> >
> >>> > On Fri, Jan 30, 2009 at 3:49 PM, zander1013 <za...@gmail.com>
> >>> wrote:
> >>> >
> >>> >>
> >>> >> hi,
> >>> >>
> >>> >> i am new to hadoop. i am trying to set it up for the first time as a
> >>> >> single
> >>> >> node cluster. at present the snag is that i cannot seem to find the
> >>> >> correct
> >>> >> path for setting the JAVA_HOME variable.
> >>> >>
> >>> >> i am using ubuntu 8.10. i have tried using "whereis java" and tried
> >>> >> setting
> >>> >> the variable to point to those places (except the dir where i have
> >>> >> hadoop).
> >>> >>
> >>> >> please advise.
> >>> >>
> >>> >> -zander
> >>> >> --
> >>> >> View this message in context:
> >>> >> http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756240.html
> >>> >> Sent from the Hadoop core-user mailing list archive at Nabble.com.
> >>> >>
> >>> >>
> >>> >
> >>> >
> >>>
> >>> --
> >>> View this message in context:
> >>> http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756569.html
> >>> Sent from the Hadoop core-user mailing list archive at Nabble.com.
> >>>
> >>>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756916.html
> Sent from the Hadoop core-user mailing list archive at Nabble.com.
>
>

Re: settin JAVA_HOME...

Posted by zander1013 <za...@gmail.com>.
i am installing "default-jdk" now. perhaps that was the problem. is this the
right jdk?



zander1013 wrote:
> 
> cool!
> 
> here is the output for those commands...
> 
> af@node0:~/Hadoop/hadoop-0.19.0$ which java
> /usr/bin/java
> af@node0:~/Hadoop/hadoop-0.19.0$ 
> af@node0:~/Hadoop/hadoop-0.19.0$ ls -l /usr/bin/java 
> lrwxrwxrwx 1 root root 22 2009-01-29 18:03 /usr/bin/java ->
> /etc/alternatives/java
> af@node0:~/Hadoop/hadoop-0.19.0$ 
> 
> ... i will try and set JAVA_HOME=/etc/alternatives/java...
> 
> thank you for helping...
> 
> -zander
> 
> 
> Mark Kerzner-2 wrote:
>> 
>> Oh, you have used my path to JDK, you need yours
>> do this
>> 
>> which java
>> something like /usr/bin/java will come back
>> 
>> then do
>> ls -l /usr/bin/java
>> 
>> it will tell you where the link is to. There may be more redirections,
>> get
>> the real path to your JDK
>> 
>> On Fri, Jan 30, 2009 at 4:09 PM, zander1013 <za...@gmail.com> wrote:
>> 
>>>
>>> okay,
>>>
>>> here is the section for conf/hadoop-env.sh...
>>>
>>> # Set Hadoop-specific environment variables here.
>>>
>>> # The only required environment variable is JAVA_HOME.  All others are
>>> # optional.  When running a distributed configuration it is best to
>>> # set JAVA_HOME in this file, so that it is correctly defined on
>>> # remote nodes.
>>>
>>> # The java implementation to use.  Required.
>>> # export JAVA_HOME=/usr/lib/j2sdk1.5-sun
>>> export JAVA_HOME=/usr/lib/jvm/default-java
>>>
>>> ...
>>>
>>> and here is what i got for output. i am trying to go through the
>>> tutorial
>>> at
>>> http://hadoop.apache.org/core/docs/current/quickstart.html
>>>
>>> here is the output...
>>>
>>> af@node0:~/Hadoop/hadoop-0.19.0$ bin/hadoop jar hadoop-*-examples.jar
>>> grep
>>> input output 'dfs[a-z.]+'
>>> bin/hadoop: line 243: /usr/lib/jvm/default-java/bin/java: No such file
>>> or
>>> directory
>>> bin/hadoop: line 273: /usr/lib/jvm/default-java/bin/java: No such file
>>> or
>>> directory
>>> bin/hadoop: line 273: exec: /usr/lib/jvm/default-java/bin/java: cannot
>>> execute: No such file or directory
>>> af@node0:~/Hadoop/hadoop-0.19.0$
>>>
>>> ...
>>>
>>> please advise...
>>>
>>>
>>>
>>>
>>> Mark Kerzner-2 wrote:
>>> >
>>> > You set it in the conf/hadoop-env.sh file, with an entry like this
>>> > export JAVA_HOME=/usr/lib/jvm/default-java
>>> >
>>> > Mark
>>> >
>>> > On Fri, Jan 30, 2009 at 3:49 PM, zander1013 <za...@gmail.com>
>>> wrote:
>>> >
>>> >>
>>> >> hi,
>>> >>
>>> >> i am new to hadoop. i am trying to set it up for the first time as a
>>> >> single
>>> >> node cluster. at present the snag is that i cannot seem to find the
>>> >> correct
>>> >> path for setting the JAVA_HOME variable.
>>> >>
>>> >> i am using ubuntu 8.10. i have tried using "whereis java" and tried
>>> >> setting
>>> >> the variable to point to those places (except the dir where i have
>>> >> hadoop).
>>> >>
>>> >> please advise.
>>> >>
>>> >> -zander
>>> >> --
>>> >> View this message in context:
>>> >> http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756240.html
>>> >> Sent from the Hadoop core-user mailing list archive at Nabble.com.
>>> >>
>>> >>
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756569.html
>>> Sent from the Hadoop core-user mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756916.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.


Re: settin JAVA_HOME...

Posted by zander1013 <za...@gmail.com>.
cool!

here is the output for those commands...

af@node0:~/Hadoop/hadoop-0.19.0$ which java
/usr/bin/java
af@node0:~/Hadoop/hadoop-0.19.0$ 
af@node0:~/Hadoop/hadoop-0.19.0$ ls -l /usr/bin/java 
lrwxrwxrwx 1 root root 22 2009-01-29 18:03 /usr/bin/java ->
/etc/alternatives/java
af@node0:~/Hadoop/hadoop-0.19.0$ 

... i will try and set JAVA_HOME=/etc/alternatives/java...

thank you for helping...

-zander


Mark Kerzner-2 wrote:
> 
> Oh, you have used my path to JDK, you need yours
> do this
> 
> which java
> something like /usr/bin/java will come back
> 
> then do
> ls -l /usr/bin/java
> 
> it will tell you where the link is to. There may be more redirections, get
> the real path to your JDK
> 
> On Fri, Jan 30, 2009 at 4:09 PM, zander1013 <za...@gmail.com> wrote:
> 
>>
>> okay,
>>
>> here is the section for conf/hadoop-env.sh...
>>
>> # Set Hadoop-specific environment variables here.
>>
>> # The only required environment variable is JAVA_HOME.  All others are
>> # optional.  When running a distributed configuration it is best to
>> # set JAVA_HOME in this file, so that it is correctly defined on
>> # remote nodes.
>>
>> # The java implementation to use.  Required.
>> # export JAVA_HOME=/usr/lib/j2sdk1.5-sun
>> export JAVA_HOME=/usr/lib/jvm/default-java
>>
>> ...
>>
>> and here is what i got for output. i am trying to go through the tutorial
>> at
>> http://hadoop.apache.org/core/docs/current/quickstart.html
>>
>> here is the output...
>>
>> af@node0:~/Hadoop/hadoop-0.19.0$ bin/hadoop jar hadoop-*-examples.jar
>> grep
>> input output 'dfs[a-z.]+'
>> bin/hadoop: line 243: /usr/lib/jvm/default-java/bin/java: No such file or
>> directory
>> bin/hadoop: line 273: /usr/lib/jvm/default-java/bin/java: No such file or
>> directory
>> bin/hadoop: line 273: exec: /usr/lib/jvm/default-java/bin/java: cannot
>> execute: No such file or directory
>> af@node0:~/Hadoop/hadoop-0.19.0$
>>
>> ...
>>
>> please advise...
>>
>>
>>
>>
>> Mark Kerzner-2 wrote:
>> >
>> > You set it in the conf/hadoop-env.sh file, with an entry like this
>> > export JAVA_HOME=/usr/lib/jvm/default-java
>> >
>> > Mark
>> >
>> > On Fri, Jan 30, 2009 at 3:49 PM, zander1013 <za...@gmail.com>
>> wrote:
>> >
>> >>
>> >> hi,
>> >>
>> >> i am new to hadoop. i am trying to set it up for the first time as a
>> >> single
>> >> node cluster. at present the snag is that i cannot seem to find the
>> >> correct
>> >> path for setting the JAVA_HOME variable.
>> >>
>> >> i am using ubuntu 8.10. i have tried using "whereis java" and tried
>> >> setting
>> >> the variable to point to those places (except the dir where i have
>> >> hadoop).
>> >>
>> >> please advise.
>> >>
>> >> -zander
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756240.html
>> >> Sent from the Hadoop core-user mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756569.html
>> Sent from the Hadoop core-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756710.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.


Re: settin JAVA_HOME...

Posted by Mark Kerzner <ma...@gmail.com>.
Oh, you have used my path to JDK, you need yours
do this

which java
something like /usr/bin/java will come back

then do
ls -l /usr/bin/java

it will tell you where the link is to. There may be more redirections, get
the real path to your JDK

On Fri, Jan 30, 2009 at 4:09 PM, zander1013 <za...@gmail.com> wrote:

>
> okay,
>
> here is the section for conf/hadoop-env.sh...
>
> # Set Hadoop-specific environment variables here.
>
> # The only required environment variable is JAVA_HOME.  All others are
> # optional.  When running a distributed configuration it is best to
> # set JAVA_HOME in this file, so that it is correctly defined on
> # remote nodes.
>
> # The java implementation to use.  Required.
> # export JAVA_HOME=/usr/lib/j2sdk1.5-sun
> export JAVA_HOME=/usr/lib/jvm/default-java
>
> ...
>
> and here is what i got for output. i am trying to go through the tutorial
> at
> http://hadoop.apache.org/core/docs/current/quickstart.html
>
> here is the output...
>
> af@node0:~/Hadoop/hadoop-0.19.0$ bin/hadoop jar hadoop-*-examples.jar grep
> input output 'dfs[a-z.]+'
> bin/hadoop: line 243: /usr/lib/jvm/default-java/bin/java: No such file or
> directory
> bin/hadoop: line 273: /usr/lib/jvm/default-java/bin/java: No such file or
> directory
> bin/hadoop: line 273: exec: /usr/lib/jvm/default-java/bin/java: cannot
> execute: No such file or directory
> af@node0:~/Hadoop/hadoop-0.19.0$
>
> ...
>
> please advise...
>
>
>
>
> Mark Kerzner-2 wrote:
> >
> > You set it in the conf/hadoop-env.sh file, with an entry like this
> > export JAVA_HOME=/usr/lib/jvm/default-java
> >
> > Mark
> >
> > On Fri, Jan 30, 2009 at 3:49 PM, zander1013 <za...@gmail.com>
> wrote:
> >
> >>
> >> hi,
> >>
> >> i am new to hadoop. i am trying to set it up for the first time as a
> >> single
> >> node cluster. at present the snag is that i cannot seem to find the
> >> correct
> >> path for setting the JAVA_HOME variable.
> >>
> >> i am using ubuntu 8.10. i have tried using "whereis java" and tried
> >> setting
> >> the variable to point to those places (except the dir where i have
> >> hadoop).
> >>
> >> please advise.
> >>
> >> -zander
> >> --
> >> View this message in context:
> >> http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756240.html
> >> Sent from the Hadoop core-user mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756569.html
> Sent from the Hadoop core-user mailing list archive at Nabble.com.
>
>

Re: settin JAVA_HOME...

Posted by zander1013 <za...@gmail.com>.
okay,

here is the section for conf/hadoop-env.sh...

# Set Hadoop-specific environment variables here.

# The only required environment variable is JAVA_HOME.  All others are
# optional.  When running a distributed configuration it is best to
# set JAVA_HOME in this file, so that it is correctly defined on
# remote nodes.

# The java implementation to use.  Required.
# export JAVA_HOME=/usr/lib/j2sdk1.5-sun
export JAVA_HOME=/usr/lib/jvm/default-java

...

and here is what i got for output. i am trying to go through the tutorial at
http://hadoop.apache.org/core/docs/current/quickstart.html

here is the output...

af@node0:~/Hadoop/hadoop-0.19.0$ bin/hadoop jar hadoop-*-examples.jar grep
input output 'dfs[a-z.]+'
bin/hadoop: line 243: /usr/lib/jvm/default-java/bin/java: No such file or
directory
bin/hadoop: line 273: /usr/lib/jvm/default-java/bin/java: No such file or
directory
bin/hadoop: line 273: exec: /usr/lib/jvm/default-java/bin/java: cannot
execute: No such file or directory
af@node0:~/Hadoop/hadoop-0.19.0$ 

...

please advise...




Mark Kerzner-2 wrote:
> 
> You set it in the conf/hadoop-env.sh file, with an entry like this
> export JAVA_HOME=/usr/lib/jvm/default-java
> 
> Mark
> 
> On Fri, Jan 30, 2009 at 3:49 PM, zander1013 <za...@gmail.com> wrote:
> 
>>
>> hi,
>>
>> i am new to hadoop. i am trying to set it up for the first time as a
>> single
>> node cluster. at present the snag is that i cannot seem to find the
>> correct
>> path for setting the JAVA_HOME variable.
>>
>> i am using ubuntu 8.10. i have tried using "whereis java" and tried
>> setting
>> the variable to point to those places (except the dir where i have
>> hadoop).
>>
>> please advise.
>>
>> -zander
>> --
>> View this message in context:
>> http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756240.html
>> Sent from the Hadoop core-user mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756569.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.


Re: settin JAVA_HOME...

Posted by Mark Kerzner <ma...@gmail.com>.
You set it in the conf/hadoop-env.sh file, with an entry like this
export JAVA_HOME=/usr/lib/jvm/default-java

Mark

On Fri, Jan 30, 2009 at 3:49 PM, zander1013 <za...@gmail.com> wrote:

>
> hi,
>
> i am new to hadoop. i am trying to set it up for the first time as a single
> node cluster. at present the snag is that i cannot seem to find the correct
> path for setting the JAVA_HOME variable.
>
> i am using ubuntu 8.10. i have tried using "whereis java" and tried setting
> the variable to point to those places (except the dir where i have hadoop).
>
> please advise.
>
> -zander
> --
> View this message in context:
> http://www.nabble.com/settin-JAVA_HOME...-tp21756240p21756240.html
> Sent from the Hadoop core-user mailing list archive at Nabble.com.
>
>