Getting started with Java programming in BlueJ


CPS313 Handout

18 August 2006

Abstract:

The purpose of the exercise is to introduce you to using Java Development Environment BlueJ. You will learn to write, compile and run a simple program using this tool. You will learn also how to run example programs from the textbook.

Setting up your Java environment

BlueJ

BlueJ is a graphical Java development environment. If you work with Windows, click on Image bluej.png icon to start BlueJ. If you work with Linux, then either start BlueJ from the program menu, or by typing  bluej  at the command prompt.

Typing in your program

If you write a program from scratch, then you can compose your code in BlueJ. You do not need a separate text editor.
It is always best to place each of your programs into a separate directory, such as hw1, hw2, ..., for your homework assignments. You probably want to place all those homework directories into another directory such as
/home/yourname/homework/
or
c:\homework\
You need to create that directory outside BlueJ, with a file manager or the mkdir command in a command shell window. Once you did, do the following steps.

Compile and run your program