On Mon, Jun 15, 2009 at 7:53 AM, Abhik Sen
Gupta(WBUT,SIT)<sanis...@gmail.com> wrote:
>
> How to install sun java in ubuntu 9.04
http://www.ubuntugeek.com/how-to-install-java-runtime-environment-jre-in-ubuntu-904-jaunty.html
replacing jre with jdk should be your answer.
> But when I try execute the javac command I get the message this
> The program 'javac' can be found in the following packages:
> * openjdk-6-jdk
> * ecj
> * gcj-4.3
> * java-gcj-compat-dev
> * gcj-4.2
> * jikes-classpath
> * jikes-kaffe
> * kaffe
> * sun-java5-jdk
> * sun-java6-jdk
> Try: sudo apt-get install <selected package>
> bash: javac: command not found
A little googling around would have given you this link
http://www.linuxforums.org/forum/ubuntu-help/98237-sun-java6-jdk.html
> Then I think That the path is not set
> But I set the path in /etc/enviroment
> and the content of the file is
> PATH="/home/sanisayani/java/jdk1.6.0_13/bin:.:/usr/local/sbin:/usr/
> local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
>
> LANG="en_AU.UTF-8"
> LANGUAGE="en_AU:en"
> JAVA_HOME="/home/sanisayani/java/jdk1.6.0_13"
> CLASSPATH="/home/sanisayani/java/jdk1.6.0_13/lib:."
>
> But javac is not working
Of course it won't! read the *following* from
https://help.ubuntu.com/community/Java
Choosing the default Java to use
Just installing new Java flavours does not change the default Java
pointed to by /usr/bin/java.
You can also use the following command to interactively make the change;
* Open a Terminal window
Run sudo update-alternatives --config java
* Follow the onscreen prompt
hth
-IDG