BlueJ



'Objects First with Java: A Practical Introduction Using BlueJ' is a textbook co-written by the developers of BlueJ and has sold hundreds of thousands of copies worldwide. Teacher support. Our free Blueroom website offers teaching resources and the chance to engage with other educators using BlueJ. This book is Part I of a two-part set that introduces the Java programming language. The text assumes the student will be using the BlueJ development environment and provides some introductory BlueJ material. Our experience has been that BlueJ is easy to learn and provides a good programming environment for the beginner programmer.

BlueJ 2.2.0 preview release notes

This release is a preview release (that is: a release that has not undergone final development and testing) of BlueJ 2.2.0.

  • Hello all, I started using BlueJ back in August and have some basic knowledge of Java, but I have a task that I am troubled with. The task is to set a value to each letter of the alphabet (a = 1, b = 2, c = 3, etc.), figure out what letters are in a string of x amount of length, and then add them up.
  • Finally, our first BlueJ class has been compiled and run. You should see the output that is pictured below Mini Programming Assignment. Step 1) Let's explore how we can create a more flexible constructor. Change the code in your BlueJ class to look like the following. Save and compile the updated class code.

The main new feature that we have planned for version 2.2.0 is the addition of teamwork support. It supports team programming by adding version control functionality, allowing students to work in teams on projects where their projects can be stored in a central repository. The initial version supports team projects using CVS as the version control system.

This initial feature preview has been released to allow interested users to get a preview of the additional functionality that version 2.2.0 will possess, and to provide feedback on functionality and possible problems in a wide variety of software infrastructures.

While all BlueJ users are welcome to download and try out this preview version, the main target audience are teachers and other users who have an interest in these new features specifically. To make use of the teamwork features it will be necessary to have access to a suitably configured CVS repository. We encourage and appreciate feedback on the features provided.

Students who are currently using BlueJ in their studies should continue to use the stable release 2.1.3 as their preferred version.

There is also some basic documentation to get started. These are fairly brief guides aimed at those with some prior version control experience. For the final release we will extend these further to be more suitable to students and other end users.

The two documents are :

For feedback, please use the bluej-discuss mailing list or mail bluej-support@bluej.org. Thanks.

Bluejacketeer

Bluejays.com

You need to have downloaded and installed BlueJ before completing the following steps.

Bluejay

  1. Download the java files you need from the class web site. You don't have to put them in the BlueJ folder, just remember where you download them to on your computer. In this example I will assume they have been downloaded to the desktop.
  2. Start BlueJ by either clicking on the icon you created when you downloaded and installed BlueJ or by navigating to the BlueJ directory and double clicking on the bluej.bat icon.

Bluejeans.com

  1. You can alter some of the defaults for BlueJ my modifying the file called bluej.defs with a text editor.This file is located in the lib directory in the bluej folder. You can also modifying the template that starts when creating new programs and classes. The template is stored in the lib -> english -> templates -> newclass folder.

  2. When BlueJ is up and running you should see a window that looks something like this:

    To create a new program you first need to create a new project. Click on the Project menu and select New Project..

  3. This opens a new window.
    From this window type in the name of the new project in the text field File name. The name of the project does not have to be the same as the name of the java file you will later add to the project. It can be anything you want.

  4. After giving the new project and name and clicking Create you see the new project.
    There aren't any classes, which are the basic building blocks of programs in Java, or code associated with the project yet. The icon that looks like a piece of paper is just a simple text file that acts as the projects readme file. You can double click on it to add comments about the project as a whole or write notes to yourself on things that need to be done. You probably won't use it much at first.

  5. If you need to add any pre-existing classes to the project now is a good time to do that. On the first assignment you need to download and add then add the DrawingPanel.java class to your project. To add the existing file to the project click on the Edit menu and then select Add Class from File..

  6. A new window pops up that allows you to navigate to the correct directory and select the file you want to add. Only files that end in .java are shown.
    Navigate to the directory that contains the file or files you want to add. If you want to add a single file, click on it and then click on the Add button. If you want to add 2 or more files from the same directory hold down the CTRL key and click on all the files you want to add, then click on the Add button.

  7. Now the new file / class has been added to the file. It shows up with diagonal lines because it has not been compiled yet.

  8. To compile a class that is part of a program you can either click the Compile button on the left side of the window or right click on the icon of the class and select the Compile option from the pop up menu.
    If the class does not have any syntax errors it will now be shown without any diagonal lines on its icon.

  9. To add a new class to the project click on the New Class button.

  10. Ai suite. A menu pops up asking for the name of the class. On assignment 1 the name must be Circle.
    Ensure the Class radio button is selected, type in Circle for the Class Name and click the okay button. A new class is added to our project.

  11. To edit the code in a class double click on its icon. This opens an editor window which is very like a simple word processor.
    Select and delete the default code in the class.

  12. Type in the changes to the program. You save the program by clicking on the Class menu and selecting Save. You can attempt to compile the program by clicking the Compile button. Any errors will show up in the text area at the bottom of the edit window. If an error occurs the line the error is on is highlighted in yellow. After compiling the program and getting it to work close the editing window w and go back to the project window. The program / class icon no longer has diagonal lines across it.

  13. To run the program right click on the icon that has the main method in it. IN assignment one, this is the Circle class. This brings up a menu that allows you to carry out various actions. (You could also compile classes here.) Select the menu option void main(args). This causes the main method of the class to be executed.

  14. Another menu pops up that asks what parameters or information you want to pass to the method, in this case main. In this class we won't normally pass any information to method main so just click Ok.

  15. This causes the program to run. In assignment 1 a separate window opens and you may have to click on that window to see the program run.
    For more help with BlueJ see the BlueJ tutorial and BlueJ reference manual.

    To the CS 305j home page