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.

I have installed java longtime back,

which java 

java -version

java version "1.7.0_09-icedtea"
OpenJDK Runtime Environment (rhel-
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

Typing java throws me up with the options which could mean that java is installed.

In my JDK path, /usr/lib/jvm/java-1.7.0-openjdk- I see jre/bin and under that I find java executable binary. I don't see javac. my JAVA_HOME (is set to my java dir) , says this -bash: /usr/lib/jvm/java-1.7.0-openjdk- is a directory

Do I need to install JDK ? How to run javac from any directory ?

share|improve this question
You seem to be using RHEL and not Ubuntu: be aware that names of packages are typically not the same in the two distributions... –  Joni Oct 6 '13 at 10:26
Yes, you need a JDK to use javac (the Java compiler). –  Nathan Osman Oct 8 '13 at 2:35
add comment

closed as off-topic by guntbert, Braiam, Eric Carvalho, qbi, Lucio Oct 9 '13 at 20:15

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – guntbert, Braiam, Eric Carvalho, qbi, Lucio
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

up vote 1 down vote accepted

It looks like you have installed only the runtime environment. For development you need to install a Java Development Kit (JDK); for example openjdk-7-jdk.

share|improve this answer
add comment

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