First Program JAVA “Hello Tony!”

as common…for the first time, I tried to write my simplest source-code and just using NOTE-PAD as my Editor.

Let’s write Java source code displaying sentence “Hello Tony!”

1. First…don’t forget to install your JDK….notice where your JDK will be installed (e.g. : “C:\Program Files\Java”)

2. Set up your Path variable in your windows system to make you easy to compile and run your source-code and byte-code any place

3. Using Note Pad write:

class HelloTony
public static void main(String[ ] args)
System.out.println(“Hello Tony!”);

4. Save as the same Class’ name “”

5. Try compile it using:


and you will get a new Byte-code file named “HelloTony.class”

6. Run your Byte-code using:

java HelloTony

Just like that….


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: