View Full Version : Installing java compiler

May 8th, 2007, 09:58 AM
Hi all!

I am pretty new with linux, and I am trying to install the java compiler.

I have installed java6 (apt-get install sun-java6-jdk), and everything works fine with Eclipse.
But I want to compile my class in a terminal, using javac. when typing javac myclass.java I get this:

The program 'javac' can be found in the following packages:

I searched the forum, found and tried this:
export JAVA_HOME='usr/lib/jvm/java-6-sun'

to the

the result is the same, javac cannot be found.

Can you please help me with this?


May 8th, 2007, 10:05 AM
The thread you used to adjust your path is somewhat out of date. My signature contains the tutorial that I (and a few thousand other people) use to install Java.

[EDIT] Consider this: let's say the backports package of Java (the one you installed) contains Javac. Let's say you just installed it, and then you just edited your .bashrc. If you don't open a new prompt, or you don't issue the command: source ~/.bashrc, your computer wouldn't realize that you had edited your .bashrc. That could be a simple problem. However, I recommend using the link in my signature to install javac into update-alternatives.

May 8th, 2007, 10:27 AM
:-) thanks!