Set JAVA Environment Path and Run First Java Program using Command Line

JAVA Environment Variable setting.
To add JDK and JRE, you need to download both.

1. Download JDK from here.
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Scroll down the page.

Accept License Agreement. And download the exe file for your relevant operating system.

You will have a JDK at describe folder of your system.

2. Download JRE from here.
Accept the license and download the exe file for 192 updates of java.




You will have a path of JRE in your system as described.



3. Set the JAVA Environment path for windows.







We are adding “System Variables” here.
Click on the “new” and add JDK and JRE path at System Variables as described below.






4. Make one JAVA folder on your system.


Make one notepad++ document at that folder.
Write the Program shown below.


Save it with “.java” extension.


5)
Go to the CMD
Before compiling the program make sure that File name and Class name are the same.


Compile the program shown as below.


Once you run the program , there will be “.class” file in the folder you saved the “.java” file.
Thus , it is says for JAVA “Write once Run anywhere(WORA)”.
You can run that “.class” file at other system with java plugins.


Now come back to the CMD.
And run the program.

So, here now you have done with the Java Environment settings and with the First program “Hello, World”.







Comments

Popular posts from this blog

Hotstar with Amazon Web Services for the Era of Gbps speed.

First Java Hello World Program By Eclipse Editor