h1

Installing java JDK and TextPad java compiler

October 12, 2008

Now this tutorial tells you how to setup your computer for some java programming. I know that  this tutorial may be useless for some people but i hope it helps for thoose absolut beginners how really needs a good start.

1. So what we do first is to visit sun’s website to download the java JDK which is a Java development kit. We’re going to need it in order to run and compile our source code. 

To download the JDK go to “http://java.sun.com/javase/downloads/index.jsp” 

When choosing a download link, always choose the JDK with the latest update.
The latest link right now is “JDK 6 Update 7″.

After installing the JDK we need to go to the commando prompt(cmd) to check and see if java has been installed properly. If you don’t already know how to access the commando prompt go to Start > Run > and type “cmd” without the quotation marks.

The commando prompt appears and we simply type “java” without quotation marks. If you installed java properlly you’ll see a bunch of text scrolling in the commando prompt and we can proceed to the next step.

2. After checking the commando prompt we need to get us a decent java compiler that does the magic when we want to transform our source code into a program.

There are many Java compilers out there but im going to introduce you to the some of the most popular
ones. 

1. Textpad 5.2. URL: http://www.textpad.com/download/index.html

2. Netbeans IDE 6.1. URL: http://download.netbeans.org/netbeans/6.1/final/

3. Eclipse IDE URL: http://www.eclipse.org/downloads/

Textpad is really good for beginners that wants to learn the Java language from scratch i would not recommend it for bigger projects but it’s a good start. Textpad is good for beginners because most compilers automatically finishes a code sentence for the programmer, this is a good tool for bigger projects and you can also use it as a beginner but i would recommend Textpad.

Like i said before both Eclipse and Netbeans are good for bigger projects and for thoose who are already familiar with the java language. Textpad is not free but you can download a evaluation copy for free and that’s what we are going to do in the next step. Both Netbeans and Eclipse are open source and free to download and someday i will make a tutorial about thoose to compilers if its requested.

In this tutorial im going to show you how to install Textpad 5.2

3. Downloading and installing Textpad 5.2

Go to Textpads website “http://www.textpad.com/download/index.html” and choose you’re language and download method of choice. I’ll choose english and after the download you’ll need to open the “txpeng520″ file (if you choose the .exe download). 

A installation guide will appear and after you’re done with the installation process fire up Textpad from the program list. You’ll see that textpad appears and you’re done!.

Now let’s this compiler by writing a hello world source code.

Source code:

                     public class HelloWorld {

                     public static void main(String [] argv) {

                               System.out.println(“Hello, World!”);
                                                 }

                      }

Now when using Textpad you have to remember that the class name “public class HelloWorld” is our file name so we have to save the file with the same name as our class name like this:

HelloWorld.java

remember to include the .java extension so we are telling the compiler that we’re dealing with a Java class file. A recommendation when writing a classname is to always capitalize every word. So if we want to name our class “HiMyNameIsCarl” you can clearly see that every word in that class name is capitalized.

After we’ve wrote down our source code we need to compile and run it!. You can compile the code by simply using the “CTRL + 1″ shortcut. If you get a message that says “Tool completed successfully” that means that our source code has successfully been compiled. You can run the program from the compiler by simply using the “CTRL + 2″ shortcut command. This will make the commando prompt pop up and telling us 
“Hello, World!” like the picture under.

We’ll you have now successfully installed the java JDK and Textpad 5.2. You are now ready to take on the world with your rad java skills :P . If you’re not i would recommend checking back to this site for more tutorials of java and other programs. Other good sites that covers some good tutorials are 

Tutorialized.com” URL: http://www.tutorialized.com

and javas own documentation, URL: http://java.sun.com/docs/books/tutorial/

I will also recommend a really good book called “Java All-in-one Desk reference for Dummies” it’s really helpfull and covers almost everything in Java. The book is written in a way so anybody understand Java. It’s not rocket science :D

I hope that this tutorial helped anybody out there and be sure to check back to this later for more tutorials about whatever :P .

About these ads

One comment

  1. Thank you so much for this website, I don’t know why they have to make this so difficult!



Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: