//{I_Code_JAVA}

Getting started with JAVA programming 

 Are you new to java? If yes here is the way to become a java expert.
How to install JAVA Development Kit on your computer 

 Step 1 

      Download java development kit from oracle. 

       Click here to download. (Use the images to get an idea)


Click on accept

Select your download type 64 bit or 32 bit 
and wait until downlaod complete.
Step 2
            After download complete run the setup.
Step 3
            Do not change install location and set it to be default
Step 4
            Wait until installation to be complete.
Step 5
           Now you have JAVA installed in your computer.

Step 6
           Then you need to set path to compile a java program. Here is the way.

Go to your java installed location. In my case it may be c:\program files\java\jdk1.7.0\ (may vary due to java version)

create a new folder named “My docs”.



Open that folder.
Now you are inside the folder named “My docs”
Now open notepad and type start and save it as “cmd.bat” in “My docs” folder.



Now go to c:\program files\java\jdk1.7.0\ bin (your may be vary)


Now copy the path in your address bar

if you are a window 8 user follow these steps;

  1. Drag the Mouse pointer to the Right bottom corner of the screen
  2. Click on the Search icon and type: Control Panel
  3. Click on -> Control Panel -> System -> Advanced System Settings
  4. Click on Environment Variables, under System Variables, find PATH, and double click on it.
  5. Now click on variable value field, put a ; at end of the value.

  6. Now paste copied path after the semi colon
  7. click on ok then again ok and ok.

Now go to c:\program files\java\jdk1.7.0\My docs
Now open CMD.bat file
Then type “javac” and press enter
If you get text like in the image below you are successful.


Now it is time to code java.

How to start java coding

Now you can start to code java. Here is an example
Open notepad .Type these text
class a1{

         public static void main(String args[]){

                     System.out.println("Hello JAVA");

        }

}
Now save this as "a1.java" in "My docs" folder.
Now open "CMD.bat" and type javac a1.java and press enter
Then if it was successful type java a1 and press enter.
Now in cmd you can see a text "hello JAVA".
Now do not close cmd keep it minimized and code some more java program.then save it.
Now again type javac and then type name of your saved java program with .java extension .
Then type java and  saved java program and press enter.



No comments: