I have JRE 6 in my PC (Windows XP) but when I compile a program in the command prompt it shows javac is not recognised as internal or external command
. Which software is needed to compile a Java program?
You need to download and install a JDK, not a JRE.
As a (very rough) explanation, the JRE contains just the Java Virtual Machine, whereas the JDK contains not only the JRE but also the compiler (javac
), some debugging tools (javap
, jvisualvm
, ...), extra libraries and the API documentation.
See also:
I suggest you run through the steps of the Hello World! Tutorial.
As per the instructions:
javac
from any directory without having to type the full path of the commandJRE stands for Java Runtime Environment. It allows you to run already compiled java programs. To compile your own programs, you need JDK which stands for Java Development Kit. You can download it at JDK Downloads Page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With