Using the JPadPro IDE with Java
-
To start JPadPro in the RCTC labs: In
the CompSci folder, double click the JPadPro icon. Occasionally,
the lab computers may need some extra steps when starting… If you get a
little box on the screen with a progress bar, don’t panic! When this
happens, you need to see Note 1 at the end of the instructions on what
to do next.
-
To start JPadPro at home: click Start,
Programs, JPadPro, JPadPro
-
JPadPro will come up in whatever state it
was left in last time. If there is a program on the screen when JPadPro
comes up, and it is not the program you want to work on, click File in
the menu line. If Close Project is not “grayed out”, click it.
If the Close Project was grayed out, or if there is still a program on
your screen, follow the instructions to close files (below). Now
JPadPro is ready for you to work on your program.
-
To close files:
Repeat either of the following steps
until you are back to the Welcome to JPadPro screen.
Option 1: Click on File menu, Close
Option 2: Click on the X in the
box in the SECOND row of the JpadPro screen.
If any of your files were changed
but not saved, you will get a dialog box asking if you want to save the
changes.
-
To start a new program:
File menu, New
Or, click the New button in the
toolbar (looks like a piece of paper).
JPadPro will ask you to select a file
type. Choose “java file”, then click OK. Then type in the name
of your program in the “Class Name” box. Note where JPadPro is going
to store the file (the Full Path box). On your own computer,
if the path shown is not where you want the file, change the path. Then
see Note 3. In the labs, you could put the files directly on the
A: drive. The advantage of working directly from A: is that you can’t
accidentally walk away from the computer with your program still on the
hard drive. The disadvantage is that even editing is annoyingly slow when
working from drive A:. See Note 2 for recommended procedure.
Click Create File
-
To work on a previously saved .java file:
File menu, Open
Find the file you want and double
click it.
-
To set editor options, screen colors, etc:
View menu, Tab Options for setting tab
size, Syntax Color for setting edit screen colors, Choose Font for setting
a different font. WHEN WORKING IN A LAB, please try to remember
to set these options back the way they were so the next person won’t have
to try to undo your changes!
-
To save changes back into an existing .java
file:
File menu, Save
Or
Click the Save button (diskette)
on the toolbar
JPadPro is set up in the labs and from
the install CD to automatically save your program when you compile or run.
Please don’t change this setting! If you turn this feature off, it
is possible to lose all your changes if you run a program and it hangs.
-
To compile:
Click the JDK Compiler button in
the toolbar (little guy holding a briefcase)
Or select JDK menu, Compile (name of your
file)
-
To run your program:
Click JDK Interpreter button in the toolbar
(little guy running)
Or select JDK menu, Run Application
Every time you make changes, you
MUST compile before running, or JPadPro will run the previous version of
the program.
-
To print the text output:
(After running the program, with the text
output in the bottom JPadPro window:)
Select the text output window
Click Print
-
To print the turtle graphics screen:
Use the Windows Print Screen function.
Alt-PrintScreen should copy the active window to the clipboard. Then
you can paste into Word or WordPad, and print from there.
-
To exit from JPadPro:
In the labs, first follow the instructions
for closing the files.
Then File menu, Exit
or click on the X button at
the top right corner of the main JPadPro window.
-
To stop a looping or “hung” program:
Click the Stop button in the toolbar
(red X)
NOTES:
Note 1:
The box with the progress bar means the
files needed for JPadPro are being loaded to the computer from the network.
This takes a few minutes (less than 5).
Then follow the instructions (earlier on
this page) for creating a new program, but don’t add anything to the file
it gives you. Press the Compile button on the toolbar (little guy
holding a briefcase). You will get a prompt about running the Setup Script.
Click Yes to run the setup script, then Yes again on the next dialog to
continue. Then you will get a box asking for the location of the
JDK. Find c:\jdk1.3.1 and double click it. You should get a
message in the bottom JPadPro window telling you that the JDK directory
is set to c:\jdk1.3.1.
To set the classpath, click the JDK menu,
Edit Standard Classpaths
Then click Add, type “c:\addons” (without
the quotes) in the box, and click OK. C:\addons should now be displayed
in the classpath box. Click OK.
Note 2:
Recommended procedure for where to put
your files when using JPadPro:
This lets you work on drive C so things
will go faster, but still make sure that you have all your files on your
diskettes.
When creating a new program – follow the
instructions for creating a new program, and don’t change the directory
that JPadPro gives you (c:\JPadPro\Documents\IDE\filename).
When changing an existing program – copy
your latest files from your diskette to c:\JPadPro\Documents\IDE\, then
follow the instructions for changing an existing program. If you
work ONLY at home, you can skip the copy step here, but BE CAREFUL!
If you work sometimes in the lab and sometimes at home, remember to do
the copy step! You can’t necessarily rely on the file timestamps
to see which is the latest, because sometimes the lab computers or your
home computer time and date may be incorrect.
When you are done using JpadPro (either
on a new program or changes to an existing one), follow the instructions
to exit from JPadPro, and then YOU MUST DO THE FOLLOWING STEPS to make
sure you have your files on your diskette:
1) Copy all your .java and .class files
from c:\JPadPro\Documents\IDE\ to drive A:. It is safest to do this
twice, onto two diskettes, in case you lose one or it becomes corrupted.
2) Delete all your .java and .class files
from c:\JPadPro\Documents\IDE\
Note 3:
If you choose to put your files in a different
directory at home, make sure you use that directory rather than c:\JPadPro\Documents\IDE\
when you follow the Note 2 steps at home.