Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javac cannot be run, and furthermore does not seem installed

Tags:

java

javac

I have a problem involving setting up Java.

I have installed the JRE, added its path to PATH, and set JAVA_HOME and CLASSPATH. Now, java and javacpl work fine, but running javac generates a command-not-found error. Furthermore, javac.exe does not even seem to exist in the JRE's bin folder.

How do I run javac?

like image 379
Irina Matveeva Avatar asked Aug 13 '13 19:08

Irina Matveeva


1 Answers

The JRE is merely the Java Runtime Environment, which includes only the infrastructure needed to run Java programs that are already compiled.

To compile Java source code using javac, you need the Java Development Kit (JDK).

On Oracle's Java download page, choose the package labelled "JDK".

like image 167
Ken Liu Avatar answered Oct 27 '22 01:10

Ken Liu