Testing a BlueJ Installation
Assuming you've installed and started BlueJ:
Under Project, create a New Project:
Then you will see this:
Create a [New Class]. Name it Warning (.java will be added
You will see this:
Double click on the brown [Warning] box (this is the class).
Erase the sample program (template).
Type in this program (or copy and paste it in).
public class Warning extends JOptionPane
public static void main(String args)
showMessageDialog(this,"Warning - Java is addictive");
Make sure the name in public class Warning exactly matches
the file name Warning.java (Java is case-sensitive). And be careful
with all the punctuation marks - they are all required.
Click on [Compile].
If you have errors, the first error message will appear in the output window
at the bottom,
and BlueJ will highlight the offending line (the M is missing from
After a successful compile (Class compiled - no syntax errors),
close the editor.
The mysterious part in BlueJ is "running" the program. There is nothing
You need to right-click on the brown class box, and choose "void
The following box appears, and you click [OK].
If everything worked, you will see the following:
This might pop-up behind other windows - I don't know why. Use
Alt-Tab to find it.
In BlueJ, you don't really "run" the program - instead, the testing environment
instantiates the class. This is peculiar at first, but it makes a very
nice test-environment available. Use [View][Debugger] to see the debugging
This will be useful later.
BlueJ might seem a bit peculiar at first, but it is definitely worth the
trouble of learning how it works. The debugging and project management
tools are excellent for IB Internal Assessment projects.