How to run Java program with tester library using JGrasp IDE.

 

á      Download and install JGrasp.

á      Decide where you will keep your work and define two folders/directories, one for the project workspace and one for the libraries you will use. We will name them JGraspWorkspace and JGraspJars.

á      Start JGrasp.  The first thing to do is to tell the JGrasp where to find the tester library.  In Settings menu select PATH / CLASSPATH then Workspace.

 

 

á      In the Setting window that opens select the CLASSPATH tab.

á      Click the New button on the right.

á      One more window will open. Hit Browse.

 

 

á      Navigate through the Look In file chooser to the JGraspJars directory, then choose the tester.jar library.

 

 

á      Hit Choose in the CLASSPATH window then hit OK.

á      In File menu select New then Java .

 

 

 

á      A new editor window will appear in the main pane. Copy and paste into it the files Shape.java.

 

 

á      In File menu select Save As, then type in Shape.java for the File name.

á      You are now ready to run the program. In the Build menu select Java Workbench, then select Invoke Static Method on Library Class.

.

á      In the window that opens click on the arrow on the left.

 

 

á      Select tester.Main among the options and hit OK.

á      In the window that opens select main(): publicÉ and click the Invoke button.

á      Or the window may look like this:.

 

á      A small window will announce the successful run.

á      The results will appear in the in the Run I/O window on the bottom. I am not sure how to resize the window, but here is the contents:

 

 

 

á      You can see that there were errors detected. In the inexact comparisons both pieces of data should be of the type double. Fix it, save the changes in the Java file, then select Compile in the Build menu. Now run the program again. You should see success.