Download the NetBeans from the XXX website and follow the
instructions to install the software
Save the ProfessorJ program you want to run in
NetBeans, say in the directory
.../ProfJPrograms. Assume the file name is books-authors.java
Create a directory where you will keep the NetBeans projects,
say .../NetBeans
Create a subdirectory .../NetBeans/Libraries of your
.../NetBeans directory where you will keep any library
files your project may need
Download the file ConvertNB.zip into the .../NetBeans
directory and unzip it there
Download the file MyProjectNB.zip into the .../NetBeans
directory and unzip it there
Download the file tester.jar into the
.../NetBeans/Libraries directory
Start the NetBeans application
In the File menu choose Open Project then
select ConverterNB
Again, in the File menu choose Open Project
then select MyProjectNB
You are now ready to convert the ProfessorJ program to
Java 1.5 and to run it
Highlight the ConvertNB project in the
Projects frame, right click and select Set Main Project
Click on the left green triangle in the top left menu bar (the
tooltip should say Run Main Project F6)
The file dialog will ask you to select the ProfessorJ
file you wish to convert. Choose the file books-authors.java
Next it will ask you to choose the location and the name of the file
you want to Save as Java 1.5 File. Choose
books-authors-nb.java in the directory
.../NetBeans/MyProject/src/books-authors-nb.java
You can click on the triangle on the left of MyProjectNB in the
Projects frame and see Source Packages, clicking on
the triangle again shows <default package> and clicking on
the triangle the third time shows the file books-authors-nb.java
Now you need to add the tester library to your
project. Right click on the Libraries tab just below the
SourcePackages tab for the MyProjectNB and select
Add JAR/Folder...
In the dialog find the file tester.jar that you have
saved in the .../NetBeans/Libraries directory
Your program is almost ready to run. Double-click on the file
books-authors-nb.java and it will open in the main frame of the
NetBeans workspace. Scroll through the file to see if there are any
remaining problems, before the program can run. Every error is marked
in red on the left hand side, with explanation of the problem
The only problems we anticipate are the method definitions for methods
required when the class implements an interface. By definition all
methods defined in an interface are considered to have public
visibility and all implementing methods have to match this. Add the
word public before the header of every method that is
required to implement an interface. You should now be able to run your
program
Highlight MyProjectNB in the Projects frame,
right click and select Set Main Project, then run the
project. The printout of all fields in your Examples class
as well as a report on all tests appears in the Output
window on the bottom of the Workspace
If the name of your Examples class is different than
just "Examples", maybe you used the name "BookExamples", you need to
do one more thing before running your project: Right-click on the
name of the project and select Properties at the bottom of
the menu choices. In the Categories frame on the left
select Run. Then on the right replace "Examples" in the
Arguments field with "BookExamples", hit OK, and
run the project