banner



How To Open Java Jdk On Windows 10

How to run a Java program in Windows x

To run a java programme in Windows 10, we need offset to install Coffee and and so set up the surround variables. To practice this, follow the post-obit steps-

How to install Java?

Step one) Visit the oracle website so click on download.

How to run a Java program in Windows 10

Step ii) Now, on the next page, click on Have License Agreement and download the .exe file of JDK for windows.

How to run a Java program in Windows 10

Step 3) After downloading the file, first the installation process by clicking on the file.

Step iv) Keep clicking on next and don't modify any default setting.

Afterward installation, we need to fix the environs variables.


How to set up surround variables?

  • Open the control panel -> System and Security -> System -> Advanced System Settings. The following dialog box will appear.
How to run a Java program in Windows 10
  • Click on Environs Variables, get to system variables, and double click on Path.
How to run a Java program in Windows 10
  • At present add the path of the bin file present in the JRE binder and the JDK folder to the Path variable. The JRE and JDK are past default, present in the Java folder of Program Files.
How to run a Java program in Windows 10

The setup of the Java environs is complete.


How to run a Java program in Windows x

To understand how to run a Java program in Windows 10, we will run into a simple instance of a Hello Earth programme-

Step 1) Open a text editor and write the java code for the programme. The program for Hi World is given below-

Step two) Save this file with the .java extension. Make sure that the name of the file should be the same equally that of the public grade. If the file doesn't accept any public course, we can save it with any proper noun, but after compilation, a bytecode file will be generated with the name of the class containing the main method.

Stride 3) Now, open the control prompt and open the directory in which we take saved our plan past using the following command.


How to run a Java program in Windows 10

In this case, the directory is desktop.

Step 4) Now, run the following command to compile the Java program.


How to run a Java program in Windows 10

Step v) After the code is compiled, it generates a bytecode file in the same folder having the .java file with a .class extension. This is the file which is executed by the JRE. To run this file, use the following command.


How to run a Java program in Windows 10

The output of the program will be seen on the command prompt.

This is how we can run a java program in Windows ten.


Source: https://www.javatpoint.com/how-to-run-a-java-program-in-windows-10

Posted by: lawsontheast.blogspot.com

0 Response to "How To Open Java Jdk On Windows 10"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel