PDA

View Full Version : [ubuntu] javac - jdk 1.7.0 issue



Rephiscorth
September 11th, 2011, 02:10 PM
hello everybody. Well, I installed th JDK 1.7 because i was asked to by my teacher at the university, to use it with eclipse.

But after installing it, when i use javac in the console it wont work. it says:

"the program 'javac' can be found in the following packages"

and it shows a list of openjdk6 and some others. but that doesnt make any sense, since i could use javac before installing jdk1.7.

thanks (:

YesWeCan
September 11th, 2011, 04:19 PM
Hi there. It should be inside your jdk directory:
jdk1.7.0/bin/javac

So you should either add this directory to your PATH or make a symbolic link to it in a directory that is already in your PATH, such as your home directory or for general access /usr/local/bin/

To see your paths in the PATH environment variable
echo $PATH
To add a new path
PATH=$PATH:/new_path/

To make a symbolic link in the current directory
sudo ln -s /.../jdk1.7.0/bin/javac .