Preliminaries:
- "Click on" means move the mouse cursor over the item and
press and release the left mouse button.
- Similarly "Right click on" means move the cursor over the
item and press and release the right mouse button. The right mouse button
usually brings up a menu of properties for the selected item.
- "Click and hold" means hold the left mouse button down while
you drag the mouse. For example "Click and hold on A->B" means move the
mouse to A, hold down the left mouse button while dragging the mouse to B,
then release.
- Do not double click (two quick left mouse presses) unless explicitly
indicated.
To access items through a menu (e.g. the File menu appearing
on the top bar of the workspace), left click on the menu item. A pull-down
menu will appear. Move the cursor over the action you want (e.g. New
Project ) and left click. In the handout we will describe this sequence
as "Select the New Project option on the File menu".
Starting JBuilder:
- If this is the first time you have used JBuilder you will need
a license key. This key can be used at school and at home. If
you use it at home be sure and place the file in the appropriate place depending
on what operating system you are using.
- Obtain a license key for SB 1.02.04:
- Page 1: Stroll down until you see the table Keys
Only. Select Foundation X
- Page 2: Fill in the information required for Login Name
(jdoe), Email Address(Your utsa address from above), and a password that
you can remember.
- Chose New User If you already have a key for
JBuilder Foundation you can use the same file from home in the lab by copying it
into the appropriate directory stated below. (If you have logged in
previously you would chose Login or just create a new Login Name on page
2.)
- Page 3: You must fill out all the information
on entries marked with a dot.Be sure that you uncheck the boxes at
the bottom of this page if you do NOT want all the junk email, mail and
phone calls. Chose Continue
- Page 4: You must respond to all these questions. Chose
Submit.
- Page 5: Email Verification. This page tells you
that you will receive an email with the licence key as an attachment. Be
sure and check that the email address is your utsa account. Chose
Submit.
- Go to your Unix account if you are not already there and find
the email from Borland. To save the attachment(Something like reg##.txt)
- select v and then s. The computers in SB 1.02.04 are using XP.
&Save the file in C:\Documents and Settings\<username>.
Note that the username is your account name such as jdoe.
- Click on the Windows START button at the bottom left
hand corner of the display.
- Move mouse to Programs->JBuilder->JBuilder Foundation
- The JBuilder window should appear. If the tip of
the day window appears, close it.
Creating a simple application
Printing your source:
- Double click on HelloWorld.java in the project browser on the left to make it the
code displayed in the right window.
- On the File menu select the Print HelloWorld.java
option. You will be asked to select a printer.
Printing your output:
-
Right click on the output window and select Copy All
- Open WordPad and select Edit->Pastepaste in WordPad.
- Save your WordPad file.
Exiting and reentering:
- Be sure to save your application before exiting. There is a
Save All icon (stacked floppy disks) that you can use to do this.
- To close the projects Select Close Projects from the File menu. Select
All and then OK
- Select the Exit option on the File menu to exit.
When you re-enter JBuilder, you can get a previous application through
the Reopen icon on the Menu Bar. Alternatively you
can open a project through the File menu.
Adding a user-defined package to your project:
- <Step 1:> If this is the first time you have added this
package to any of your project:
- From the Project menu select
Project Properties
- Select the Required Libraries tab
- Click Add
- Click New
- Give the library a name. For example, suppose you wanted to add the cs1.jar file
that you stored in C:\java\cs1.jar. Give the library a descriptive name such as CS1Library.
Then click add and find the actual file or directories that you want to add.
- Exit out of all the windows by clicking OK four
times
<Step 2:> Adding this package as a default:
- From the Project menu select
Default Project Properties
- Select the Required Libraries tab
- Click Add
- Under the UserHome directory click cs1
(the one from step 1)
- Click OK (twice).
<Step 3:> Add the appropriate import: Add the appropriate line after the package statement at the top
of the file. For eacmple to use the Keyboard class in the cs1.jar library, add:
import cs1.*;
You can then use the keyboard class.