Execution of java and javac commands

Michael Beattie mtbeedee at gmail.com
Tue Dec 6 14:19:57 UTC 2005


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




More information about the ubuntu-users mailing list