Programming and Computer Science in Java:
Class Notes: Introduction to JJ
Online
David Kosbie,
2002-2003
See Course Home Page.
Today we will test the JJ online Java environment. This may make it
easier for some of you to use Java from your home, a friend's house, the
library, and so on. (Then again, it may not -- that is why this is a test.)
Basically, you can use JJ from anywhere that has Internet access, and at least
for now, you can do all your homework and studying in the JJ environment as well
as in JCreator.
How to Use JJ
- Get your Username and Password (from me)
- Log in to JJ
- Go to http://www.psvm.com/
- Enter your Username and Password (at lower left)
- Enter my Teacher Code (dk03) (also at lower left)
- Hit the "Login" button (alas, also at lower left)
- Set up your environment
- Look under "Help" button in center-top of screen
- First button should read "main(String[] s)"
- Second button should read "Java 1.1"
- Third button should read "no lib"
- Enter our own sample JJ program
- If there is any code in the JJ edit area (top left), delete it
- Use ctrl-A to select-all, then the Delete key to
delete it
- Copy our sample JJ program
- Use ctrl-A to select-all, then ctrl-C to copy it
- Paste it into the JJ edit area
- Use ctrl-V to paste the copied text
- Note that this code uses "println" and not "System.out.println"
- Note that the readInt code for JJ is different from the readInt
code for JCreator.
- Compile the code
- Hit the "CheckIt" button in the middle of the screen
- If there is an error, it will be displayed both at the bottom and on
the right part of the screen. Fix the error and hit
"CheckIt" again.
- If your program compiled correctly, the "RunIt"
button in the middle of the screen will be selectable.
- Run the code
- Hit the "RunIt" button in the middle of the screen
- This brings up a new screen, but does not yet actually run your
program.
- Hit the "Start" button on the top left of the RunIt
screen.
- Here is a quirk: all your output is in the top window, but when
your program requests any input, that is entered in the middle window
(type your input and then hit the "Enter" button to the
right).
- You may stop your program at any time using the "Stop"
button at the top left.
- Edit the code again
- Exit your program (either using the program itself, say by entering -1
for many programs, or by using the "Stop" button at the
top left).
- Hit the "Back to CodeIt" button on the bottom left of
the RunIt screen.
- Logout
- When you are done, logout!
See Course Home Page.