No Comments

categories: Java

author: selgon

Starting programming in JAVA

Your first program in java.

First you need to go to Java SE Development Kit (JDK) 6 Update 10 this will allow you to test your code in Windows but before you can test you have to right click on My Computer and go to properties. Inside of there you will have tabs at the top you need to go to advanced and environment variables. Inside of there you have to change the system variable Path to the bin location you installed java if you installed the default it will be C:Program FilesJavajdk1.6.0_10bin. Once you do that you can start coding.

First set up a folder in the C: and call it something like test.
Second inside of the test folder open notepad and type in this:
public class HelloWorld {
public static void main(String[] args) {
System.out.println(“Hellow World”);
}
}

Then save in as HelloWorld.java

Third open up command prompt by going to Start-Run and type in cmd. Now you have to get it on the proper folder so you type in cd C:test

Fourth it sould look like this C:test. After that type in javac HelloWorld.java. Now your file is compiled into a java format so now all you have to do is type java HelloWorld and it should display.

Hello World

That is the first task for java, you can find all different kinds of java code just by searching the web.
Next week I will get more in to depth with the lesson.

Shane Strong
Chosen Development

Popularity: 1% [?]

Related Posts

  • No Related Post

Leave a Reply

Your Avatar
Your Name
September 2nd, 2010