Flag This Hub

How to set up for Java Programming

By


Introduction

Hi there.  This is my first ever hub or blog so please be easy with me ;-) I thought that today we would take a look at setting up a java environment so we can start doing some tutorials in java.  One thing I always try and do is make my tutorials as easy to follow as possible, so if your having difficulties with something, just let me know.  Additionally, as I spend every single possible moment at the computer, I have gained a strong knowledge in many programming languages and multimedia applications.  If you have any preferences on the tutorials you would like to see, for example maya, flash, php etc, let me know and I will see if this can be arranged.

I hope you enjoy the tutorials, so lets get started.

Downloading JCreator

JCreator is whats known as an Integrated Development Environment (IDE), but really this is just a posh name for "somewhere to run and execute java code". There are many different IDE's out there you could use, but I feel JCreator is the easiest to learn for beginners, as there are very few features compared to others.

The first thing you want to do is head over to the JCreator download page, and select the download for JCreator LE v.5.00 - For Windows 7, Vista and XP.

The link to the download page can be obtained below:

The Download Process

See all 11 photos

Download and Install JCreator

Once you hit the download button, the next page will ask for your name and email address.  Enter these details in and JCreator will be emailed to you.  Open up your email, and in it will be a link to the download.  Click on this link and download the software.

Email Download

Install JCreator

Ok.  Once you have downloaded the JCreator installation file, double click on it to start the installation process.  This part is pretty straight forward, as for now you can just keep all the deafult settings (meaning just keep pressing next...).  After you have completed this, if JCreator loads up, no worries.  Once again, you can just accept all the defaults and keep pressing next.  If JCreator doesnt load up dont panic, as we will be setting this up a bit later on.

Installing the Java Development Kit (JDK)

Just when you thought it was over, we move onto something people sometimes find difficult doing.  This is installing the Java Development Kit (JDK).  I wont go into techinical details here, but the JDK basically works inside of JCreator, and it allows you to compile java classes.  Dont ask me why, but I like to think of JCreator as the body of a car, while the JDK is the engine inside the car. 

Now we are going to head back over to the JCreator download page to download the JDK.

Download Link

Now your back on the JCreator download page, head down to the bottom under the section Sun J2SDK downloads and click the download button next to Sun J2SDK

This time, when you click on the download button, you will be taken to the Oracle Webpage.  Scroll down the page a little bit until you come to the table labeled Java Platform, Standard Edition.  Here, we will click on the button title Download JDK.

Once you have clicked this button, the next page will ask you to choose your operating system from a drop down menu, and agree to the terms and conditions.

Once you have selected these options, click the Continue Button to be taken to the next page.  On the next page, you will finally receive the download link.  Click on this link and save the installation file to a convienient place on your computer.

Running the installation file

Once your file has downloaded, double click on it to start the installation. Once again, you can pretty much just click next and install the download with its default values.

Now comes the fun part.  Once this has installed, we should set the path variable so we dont have to enter it every time we execute a java program.  To do this, you need to locate the path of your bin file.  The path is normally set to

C:\Program Files\Java\jdk1.6.0_23\bin

To check this out, go to your C drive.  Double click on the Program Files folder.  In here, search for and locate a folder named Java and double click on it.  In the Java folder, find a folder with a similar name to jdk1.6.0_23 and double click on it.  In this folder, you should see a folder named bin.  If this is correct, the path shown aboth is perfect.  If not, you will need to locate your java folder and then locate the bin folder.  By default, the above should be the path on a windows machine.


Setting the PATH Variable

Now we know the path to our bin folder, its time to set the PATH Variable.  The process you take to do this will depend on your operating system, but I will demonstrate where to go and how I got there.  Head to your control panel (Start>Control Panel).  Inside of the control panel, I generally like to work in Classic View.  Find the System Icon and double click on it.

Inside the System dialog, select Advanced System Settings.  On other versions of Windows, this is generally called Advanced.

Once you have clicked on this, a Systems Properties dialog will be displayed to you.  Here, click on the Environment Variables button.

Inside of the Environment Settings, go down to the System Variables Box.  Here, scroll down the List until you come across the path variable. 

Next, double click on the Path variable to bring up an Edit System Variable dialog.  Here, you have two fields; Variable name and Variable value.  We are interested in adding the path to our bin folder onto the Variable value. To do this, make sure you are as far right in the field as you can go.  You may have other variables already set which you do not want to delete, remember, all we are doing here is adding a new variable.

If the last variable in the field does not end with a ; add one.  Finally, add the path to the bin folder which we discussed earlier.

Finally, click OK to set the variable, close all other windows, and your done. Well Done. 

To check the JDK has been installed successfully, bring up your command prompt.  If you are unsure how to do this, search the internet to find the correct way to do this for your operating system.  When in here, type

javac -version

If you are shown the javac version and a load of other options, everything is ok.

Final Notes

You are now ready to start programming in Java.  I know this has been a long process setting it up, but from now on, its time to start enjoying yourself.  If you open up JCreator for the first time, it should ask you to perform some settings.  These are generally set by default, so you should be ok just clicking next again (as you can tell, I like clicking next!)

If JCreator does not set this up for in, from its Menu Bar, select Configure>Options.  In the Options dialog, on the left menu, locate JDK Profiles and select it.  When this option displays in the center panel, select New to add a new profile.  Browse to your JDK Folder and click on OK.  We are now browsing to the bin folder here, but the JDK folder which should be jdk1.6.0_23.  Once you have done this, your dialog should be updated with some files from this folder.  Just click on OK and you should be good to go. 

Any problems, let me know, and I will try and help you the best I can.  I hope you enjoyed this tutorial and I promise things will start getting more exciting soon.  Remember, if you would like to make suggesstions on the type of tutorials you wish to see, let me know and I will try and accomodate you.  I can do many programming languages plus multimedia programs such as Maya, Flash, Photoshop etc.

If your into tutorials, sign up to this blog so you are informed when a new tutorial comes out.  Additionally, you can visit www.mytutorialplanet.com to go through a variety of different tutorials.  The site is relatively new, and should be updated anytime soon.

Hope to see you soon and have fun programming.


Nick

Comments

Nena 16 months ago

That was sooooooo helpful, many thanks.

remz 14 months ago

doesn't work for me

remz 14 months ago

can you make a video?..

remz 14 months ago

i using windows 7 ultimate 32bits

mytutorialplanet 14 months ago

Its problably because there is a slight difference doing it on windows 7. If you explain to me your problem, I will tell you how to get pass it.

Java Programs 3 months ago

That was best .... Java rocks .....

Submit a Comment
Members and Guests

Sign in or sign up and post using a hubpages account.



    Like this Hub?
    Please wait working