Java Install

How to install Java?

Download java for free at oracle.com to install java on your computer.

Install the JDK if you don't have installed it, download the JDK and install it.

Set path of the jdk/bin directory as below 

  • Set temporary path of JDK = > 1. Open the command prompt 2. Copy the path of the JDK/bin directory 3. Write in command prompt: set path=jdk_bin_path i.e C:\Program Files\Java\jdk-11.0.1\bin
  • Set permanent path of JDK => Go to MyComputer properties -> advanced tab -> environment variables -> new tab of user variable -> write path in variable name -> write path of bin folder in variable value -> ok -> ok -> ok

Check java version in command promt using command java -version to check if Java is running on your machine

Create the Java program

Compile the Java program using command javac Main.java

Run the Java program using command java Main

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

32388