banner



How To Start Java In Windows 10

How to run a Java program in Windows ten

To run a java program in Windows x, we need offset to install Java and so fix up the environs variables. To practice this, follow the following steps-

How to install Java?

Step 1) Visit the oracle website and and so click on download.

How to run a Java program in Windows 10

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

How to run a Java program in Windows 10

Step 3) Afterwards downloading the file, starting time the installation process by clicking on the file.

Step 4) Keep clicking on side by side and don't alter whatever default setting.

Afterward installation, we need to set the environment variables.


How to set up upwards environment variables?

  • Open the control panel -> System and Security -> Organisation -> Advanced System Settings. The post-obit dialog box will announced.
How to run a Java program in Windows 10
  • Click on Environment Variables, go 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 by default, present in the Java folder of Plan Files.
How to run a Java program in Windows 10

The setup of the Java environment is complete.


How to run a Coffee program in Windows 10

To understand how to run a Java program in Windows 10, we will see a uncomplicated example of a Hello Earth program-

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

Step 2) Salvage this file with the .coffee extension. Make sure that the proper noun of the file should exist the same equally that of the public grade. If the file doesn't have any public class, we tin save it with any proper noun, but later compilation, a bytecode file will be generated with the proper name of the grade containing the primary method.

Step 3) Now, open up the command prompt and open the directory in which nosotros have saved our programme by using the post-obit command.


How to run a Java program in Windows 10

In this case, the directory is desktop.

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


How to run a Java program in Windows 10

Step 5) Afterward 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 past the JRE. To run this file, use the post-obit control.


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 10.


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

Posted by: mcdowellwhoustoll.blogspot.com

0 Response to "How To Start Java In Windows 10"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel