Compile and Run a Java Program
This tutorial will take you step by step through the process of writing a java program, compiling and running it.
Comments such as /* this is a comment */ or // this is another comment are inserted to explain what does the line of code do.
but before this we have to make some changes,there are many ways to do,but here are the 2 simplest ways:
1) create shortcut on your desktop of CMD type,give it some name say 'java'.
2) open jdk folder in the drive you installed jdk,then open the bin folder,copy the path of bin folder.
3) open the properties of the shortcut you created and paste this path in startin field of the properties,then click on 'ok' button,now the job is done.
now taking the 2nd way:
1) open jdk folder in the drive you installed jdk,then open the bin folder,copy the path of bin folder.
2) Open the properties of 'My computer' ,click the Advanced tab on top.
2) then open the environment variables,in it click on new button.
3) enter the variablename as Path and variablepath as path of bin that you have copied.
4) then click the 'ok ' button.
after you have made the changes,you are now ready to do your first java program.
Search This Blog
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment