Execution of java and javac commands

Alfred Vahau alf.vahau at upng.ac.pg
Wed Dec 7 08:00:48 UTC 2005


On Tue, 2005-12-06 at 09:19 -0500, Michael Beattie wrote:
> On 12/5/05, Alfred Vahau <Alf.Vahau at upng.ac.pg> wrote:
> >  I have installed the j2sdk1.4.2_10 Java binary on my Ubuntu system (Warty)
> > and made a symbolic to the java and javac commands in /usr/bin/java and
> > /usr/bin/javac. /usr/bin is on the PATH environment. Where I issue the which
> > java command, it returns a blank line. When I issue whereis java
> >  it returns a positive output: java: /usr/bin/java
> >
> >  I conclude that the output of the which command is an acknowledgement  of
> > the path being correct. For instance, I can issue which perl and get the
> > result
> >  /usr/bin/perl so the perl command is on the system path.
> >
> >  The java symbolic links are soft links  and created thus
> >
> >  ln -s /usr/local/bin/j2sk1/4/2_10/bin/java /usr/bin/java
> >  ln -s /usr/local/bin/j2sk1/4/2_10/bin/java /usr/bin/javac
> >
> >  The java binary file (with extension bin) was unpacked in the
> > /usr/local/bin directory.
> >  How can I get the system to recognize that java and javac are on the
> > environment path? I have tried rebooting (I didn't think this was necessary
> > but tried anyway and it didn't make a difference.) For noting the execution
> > of the java command is successful when I am in the directory containing the
> > command and issuing a command for an example like so:
> >
> >  ./java -jar SampleTree.jar
> >
> >  and I get a window with the demonstrated output.
> >
> >  Thanks in advance for any pointers.
> >
> >  Alfred,
> >
> 
> I dont know if it was a typo or not, but those links are not correct.
> 
> j2sk1/4/2_10 is not a valid path... it should be something like j2sdk1.4.2_10
> 
Sorry it was a typo. The directory of course is j2sdk1.4.2_10 as you
guessed correctly.

Alfred,







More information about the ubuntu-users mailing list