1. |
Go to your desktop and double-click the jGrasp icon to launch the
program. The icon appears as follows:
![](../images/jGraspLib_0.gif) |
![](../images/jGraspLib_1t.gif) |
2. |
On the Settings menu, choose Compiler Settings. From
the sub-menu, choose the only option, Workspace. A dialog box will
appear. |
![](../images/jGraspLib_2t.gif) |
3. |
- From the drop-down menu labelled Language, choose
Java.
- In the long list in the center of the dialog box, select the
line that says jdk (integrated debugger, HotSpot VM, assertions, enums) -
generic. You may draw the right side of the dialog box to make it wider,
enabling you to see the entire lines in the central pane.
- Click the Use button.
- Verify that your dialog box now looks like the one shown on the
right.
|
![](../images/jGraspLib_3t.gif) |
4. |
Click the tab in the top row of tabs that is labelled
PATH. |
![](../images/jGraspLib_4t.gif) |
5. |
Click the bottom button labeled New. In the resulting dialog
box,
- Either type in
C:\java\Robots\becker.jar in the top textfield or use the Browse button to find it.
- Either type in
C:\java\Robots\doc\ in the bottom textfield or use the Browse button to find
it.
Click OK. |
![](../images/jGraspLib_5t.gif) |
6. |
A new entry should appear in the bottom section of the dialog box.
Click OK to return to the main jGRASP window. |
![](../images/jGraspLib_6t.gif)
![](../images/jGraspLib_6bt.gif) |
7. |
From the Project menu, select Open. Navigate to C:\java\Robots\examples\ch01\deliverParcel\ . Select the file named deliverParcel.gpj and click
Open.
An Open Projects pane will be added to the left side
of the display. |
![](../images/jGraspLib_7t.gif)
![](../images/jGraspLib_7bt.gif) |
8. |
Double-click the DeliverParcel.java entry in the Open
Projects pane (circled). This will open the first Java program described in
the textbook. |
![](../images/jGraspLib_8t.gif) |
9. |
To run the robot program:
- Click the compile button,
, to
compile the program. An alternative to to choose Compile from the
Build menu.
- Click the run button,
, to
run the program. An alternative is to choose Run from the Build
menu.
The result should be the program shown on the right.
Congratulations! You're ready to start programming! |
![](../images/jGraspLib_9t.gif) |