<%@ EnableSessionState=true %> <% Option Explicit dim thisurl thisURL=Request.ServerVariables("PATH_INFO") & "?" & Request.ServerVariables("QUERY_STRING") const title="Java Games tutorial #1 - Installing the BlueJ IDE" %>
Current area: HOME -> Java Games tutorial #1 - Installing the BlueJ IDE

Java Games tutorial #1 - Installing the BlueJ IDE

BlueJ is the IDE you'll be using to write Java projects. It's freely available from www.bluej.org. There are other free IDEs out there--most notably, netBeans (found at www.netbeans.org). We're going to start with BlueJ because it's easy to use and is designed to help programming newcomers to understand Java.

 

Downloading BlueJ

First, you'll need to point your browser to www.bluej.org. You should notice a "download" section in the upper left of the home page:

Click on the "Download" link, and you'll find yourself here:

If you're using a Windows machine, grab bluej-115.jar. Mac users should download BlueJ-115.sit. We're assuming that you're using a Windows machine.

After you click on the link, Windows will ask if you want to save the file to disk or open it remotely. You should choose "Save to disk":

As before, Windows will ask where you want to save the file via a standard "Save File" dialog box:

Make sure you remember where you save it! That will make launching it a whole lot easier.

 

Installing BlueJ Automatically

Once you have downloaded the file, you may see a link to "installation instructions"  You can follow that link and try out their instructions, but they may not work unless your machine is configured a certain way.

 

Installing BlueJ Manually

If the automatic installation fails, you can proceed manually. This consists of a simple three step process:

  1. Unzip bluej-115.jar
  2. Launch the installer class manually
  3. Follow the installation instructions.

To complete step one, just launch WinZip and open bluej-115.jar. The archive should contain the following files:

  • Installer$1.class
  • Installer$2.class
  • Installer$InstallThread.class
  • Installer.class
  • Manifest.mf

Extract these into a suitable directory.

For step two, you'll need to open a DOS box (or a console window, if you're running Windows 2000/XP). Change directories so that you're in the folder with the extracted files, then type

java -cp [current directory] Installer

(where [current directory] is the path where the extracted files live).

For instance, if you extracted into c:\blueJ, you'd 

  • open the DOS box
  • type cd c:\blueJ
  • type java -cp c:\blueJ Installer

This may not work--Windows may not know where java lives. If that's the case, you'll get a "Bad Command or Filename" message. In the event that this happens, you'll need to modify autoexec.bat to point to your java installation.

 

Modifying autoexec.bat

If you do get the "Bad command or filename" error, it means that Windows can't find java. You can fix this by putting the path to your java installation into your autoexec.bat file.

To do this, first back up your current autoexec.bat file (found on the C:\ drive, probably). Copy it to something you'll recognize, like "autoexec.bak". Then, open the original batch file in your favorite text editor. Look for a line that starts like this:

SET PATH = 

All you have to do is add the path to your java executable  to the end of this line (separated by a semicolon). So, what is that path? Well, it starts with the directory into which you installed java (previous section), and ends with "\bin". 

For instance, if my autoexec contains this line:

SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND

then I need to change it as follows:

SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\JDK1.3\BIN

After modifying autoexec, you'll need to reboot your machine. You can then try the installation again.

If you still can't get BlueJ installed, email us and we'll help you troubleshoot your problem.

IMPORTANT: if you're machine acts strangely after you modify the autoexec file, or if your modifications fail to work, delete the modified file and restore the original from your backup. That should restore your original settings and get everything back to normal.

 

A Final Installation Note

When you get the BlueJ installer up and running, it will look like this:

Note that it needs to know where you installed the JDK. Under some circumstances, it may "figure this out", but if it doesn't, just enter the directory from last step (now you see why we made such a big deal about remembering where you put it). You can also browse to it using the button shown.

Once everything is installed, you can start playing with an existing project.