Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

javac is not displaying

Hi friends, in this image java is installed on my computer and when i use the " java -version " shows me the message diplayed in the image . But, when I use javac -version this show me error " not found " why is this so and how to properly set java on my computer so as to use this for my programming compiling and executing java files. Thanks in advance !!

I installed openjdk as well:

enter image description here

share|improve this question

If you see there ,you have installed Java Run time Environment which is actually needed to run Java based software in your system.

for example If you place java filename then it will execute that particular java file.

but javac belongs JDK which stands for Java development Kit , which you need If you would like to do programming on Java.

To get install Java for programming you can install openjdk-7-jdk with

sudo apt-get install openjdk-7-jdk
share|improve this answer
@grv.giit friend Open JDK Runtime environment states that only . – Raja Jan 1 '13 at 16:21
:- can i compile my java files by : javac <filename>.java now ?? – grv.giit Jan 1 '13 at 16:27
If you got Java runtime environment then you can do only Java <filename>.If you would like to do javac <filename>.java then you have to install what i have mentioned in my answer. – Raja Jan 1 '13 at 16:34
@grv.giit you see the comment. – Raja Jan 1 '13 at 16:43
@snow- How do I compile when i have not set the path and classpath here .. please reply :) – grv.giit Jan 1 '13 at 17:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.