0

Java Tutorial 1.2: Creating your first application – Hello World

Posted by Dr. Burton on June 4, 2010 in Java Tutorials |

In this tutorial we will be creating our first application, the standard “Hello World” used as the first lesson in most programming languages.

To make it a little more interesting I have broken the lesson into two parts. In the first part I will demonstrate how to make the “Hello World” application with just notepad and the JDK command line.  In the second we will use the Eclipse IDE to accomplish the same application.

The code for both sets (just in case it’s not clear in the video) is:

public class HelloWorld
{
public static void main(String[] args)
{
System.out.println(“Hello World”);
}
}

[tubepress video=”PjhzQ3SiSqw”]

The command line is accessed by in Windows 7 by clicking the windows button, type ‘run’ in search box, them type ‘cmd’ and press enter.  Also, Windows 7 will not allow you to save the HelloWorld to the root of C:\ so you will need to put it in another folder like C:\java.
The easiest way to do this in Windows 7 is:

cd \Program Files (x86)\Java\jdk1.6.0_20\bin (your jdk directory might be different)
then at the Prompt type: javac  c:\java\HelloWorld.java

Part 2:
[tubepress video=”DcdEQwBRUK4″]

Part 3:
[tubepress video=”66ewZWo0rhE”]

Tags: , , ,

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Copyright © 2010-2019 Burtons Media Group All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.