How to download and install java in your machine
Click the below link and download JDK & JRE for your machine.
Accept the service agreement radio button and then download the setup as per you OS.
Now select the option as per your Operating system.
For example : If you have windows 32 bit OS then click "Window offline" link a small popup will open now save it & then simply install it.
Verify that java is installed properly or not1. Open the commond prompt (in windows OS click ctrl+R, after write CMD and hit Enter key)
2. Write the commond
3. If java is installed you will get result like :
Java version "1.7.0_75"
OR Go to the C drive, then go to program files here your java folder will be available
Run the Java program in NotepadOR
Environment variable setup to run the java program in Notepad
Follow the below steps :
0. Go to C drive then program files , select java folder then select JDK folder & copy the complete path (like:C:\Program Files\Java\jdk1.7.0_75)
1.Go to the C drive and create a new folder & give a name to it Like "MYWork".
2. Go to the My computer , right click & select "properties"
Alternative way is :
Go to control pannel --> Select System and Security -->select System
3. Click the link Advanced System Settings a popup of name "System properties" will open
4. In System properties popup go to Advanced option and then click Environment Variable button
5. Under System Variables grid click the New button.
6. In Variable Name textbox enter JAVA_HOME
7. In Variable Value textbox paste the java c drive path that you copied in step 0 and click OK button.
8. Now back to the Environment Variables dialog, look for a variable called Path under the System Variables list, and click Edit
9. Add this;%JAVA_HOME%\bin in the end of variable value text box and click the OK button. Now you have done your environment variable setup.
10. Every program in MYWORK folder will run in Commond prompt.
Create a Java Program & run it in CMD Go to the your C drive & then Folder MY WORK that you have created above.
Open the Notepad & write a simple java program :
public class Test
public static void main(String args)
Now save the Notepad by class_name.java format, here for above example : Test.java
Open your CMD
use cd.. commond to exit from folder and cd commond to get into MYWORK folder Write java compile commond javac for example : javac Test.java
Write Java Run commondjava for example : java Test
Result : Hello Chandan
Also you can download java editor tool like eclipse & run you java program directly
use below link to download eclipse.
select the link as per your OS and download it.After download open the downloaded folder and then click eclipse icon.
Editor will be launched now create you project & your class write the program and run it.