Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I type javac in the terminal, this is what I get:

The program 'javac' can be found in the following packages:
 * default-jdk
 * ecj
 * gcj-4.6-jdk
 * openjdk-6-jdk
 * gcj-4.5-jdk
 * openjdk-7-jdk
Try: sudo apt-get install <selected package>

I want to try the suggestions from this post: http://stackoverflow.com/a/8864640

But I can't find the reference to the javac. I expected to find javac inside /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin but it's not there.

What should I do to get javac working since it's not where it is supposed to be?

This is what I get for java -version:

java version "1.7.0_25"

OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.12.04.2)

OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

so I guess JDK is properly installed.

Thanks in advance!

share|improve this question
    
Have you tried something like locate -br ^javac$ ? –  Samuel Peter Dec 8 '13 at 23:17
    
yes Samues, but no results are displayed. –  Boel Dec 8 '13 at 23:20

1 Answer 1

up vote 1 down vote accepted

I think you have only installed JRE (Java Runtime Environment) Only. javac comes under JDK (Java Development Kit) package.
To install JDK, open terminal and type following command:

sudo apt-get install openjdk-7-jdk.

share|improve this answer

Your Answer

 
discard

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.