Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

I am currently at a loss as to why this is happening. I did some basic research by running:

whereis javac


find / -name javac

...and I came up with nothing I searched the web for answers but they all seem to focus on javac existing on the filesystem, and that needs to be done is to restore a missing sym-link.

Has anyone run up against this issue and found a solution ?

I have attempted to install openJDK on Scientific Linux 6.3 with the command:

yum install openjdk


share|improve this question

You actually just need to install java-[version]-openjdk-devel, because the base package doesn't include compilers or other developer tools. This contains /usr/lib/jvm/java-[version]-openjdk-[version].[arch]/bin/javac, and will use the alternatives system to set up a symlink to /usr/bin/javac.

share|improve this answer
Someone needs to tell the package maintainers what the 'd' stands for in 'jdk'! – David Minor Apr 4 '14 at 18:41
javac: Command not found

If you receive this error, UNIX cannot find the compiler, javac.

Here's one way to tell UNIX where to find javac. Suppose you installed the JDK in /usr/local/jdk1.8.0. At the prompt you would type the following command and press Return:


Note: If you choose this option, each time you compile or run a program, you'll have to precede your javac and java commands with /usr/local/jdk1.8.0/. To avoid this extra typing, you could add this information to your PATH variable. The steps for doing so will vary depending on which shell you are currently running.

Class names, 'hello', are only accepted if annotation processing is explicitly requested

If you receive this error, you forgot to include the .java suffix when compiling the program. Remember, the command is javac not javac hello.

For more details, consult this lecture "Creating a Hello World application" in this page.

share|improve this answer

Yum list openjdk to make sure the file is in the rpm then you can run yum whatprovides *\javac to see all packages that contain the binary.

share|improve this answer
yum list doesn't do what you think it does. yum provides is a good suggestion, though. – jgoldschrafe Oct 14 '12 at 20:51

Have you tried making a softlink from the library utility location to your terms or bin dir?
Have you tried?

grep -r javac /usr/jdk
share|improve this answer

Javac is not included in the OpenJDK package. You will need the JDK package from Oracle in order to get that, and other, executable java programs.

share|improve this answer

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.