How to create a JBuilder project
All of your work in JBuilder must be done within the context of a project.
JBuilder adds .jpx to projects.
To create a new project in JBuilder, follow these steps:
- Choose File|New Project. In the Project wizard, enter the project's name.
Choose org/opensourcephysics/sip/ch3 (or whichever chapter you want) as the source directory. Click Finish.
JBuilder adds a directory to ch3 with the same name as the project name.
- Choose Project|Add Files/Packages. Add the files you want to run.
For example, to run MyMathApp.java, add MyMathApp.java and MyMath.java files to the project. which would probably be called MathApp.jpx.
- In the project pane (on the left), you will see the project name and the included files. If you click on the files, their content will be shown in the content pane.
- To run a file or project, you have to configure the libraries.
We want JBuilder to be able to import and execute the opensourcephysics package.
To make JBuilder see those files, choose Tools|Configure Libraries.
On the left choose "User Home" from the list of directories.
Click new.
In the "Define a new Library" window, give the library a name such as path1.
Click add to add a path to the library path window.
Choose /jbproject directory. You should see /home/userName/jbproject as the path.
- After the path is defined, add this path to the project. Choose Project|Project Properties.
Click on Path|Required Libraries.
Click Add to add the path we defined in step 4. Under the user home directory path1 should be listed.
- In Project|Project Properties menu click on Run tab.
Click on the three dots next to the Main class line in Application tab. Type the name of the target class that. For example, MyMathApp.java has the main method, so MyMathApp has to be typed as the class name.
Please send comments and corrections to Natali Gulbahce, e-mail.
Updated 8 February 2002.