16. JDK (java development kit)
is a software development environment used for developing Java applications and applets.
It is a superset of a JRE and javac compiler.
18. Compiler (javac)
A compiler is a computer program that transforms source code written
in a programming language into another computer language.
Java source code Bytecode
Compiler
19. JRE (Java Runtime Environment)
JVM(Java Virtual Machine) = interpreter
A (JVM), interprets compiled (bytecode) for a computer's processor
(hardware)
JVM
JRE
22. Make sure if javac (java compiler) is exist.
Run CMD and write these commands and click enter
23. The result should be as the following picture
So You have java compiler!!
This is the directory where
the java compiler is located
24. Define the java compiler directory path
1- Open System properties
2- Go to Advanced tab
3- Click ‘Environment variables’
4- Under ‘System Variables’ scroll down to
find PATH. Edit the entry and add JDK path.
5- Click OK and close the windows.
Note: you can copy the compiler directory in the
previews picture and paste it to variable value.
25. Change the directory. Here the
source code is located on
desktop.
Compile the source file
via java compiler(javac)
Run the compiled file via
jvm
Display the result/ output
Run test.java program in CMD