JBuilder Personal 6.0
JBuilder Personal is a free graphical development environment for Java
from Borland. It runs on Windows,
MacOS X 10.1, and UNIX. It provides:
- A great editor, with syntax highlighting, statement completion, and
version control
- Integration with the Java API docs (just put your cursor on the
class name and hit F1 to get the documentation for it)
- Quick location of compile errors
- A reasonably fast, full-featured debugger
What You Need To Run JBuilder
You will need a PC running Windows or a Mac running OS X to run
JBuilder. It is somewhat of a memory hog, so we recommend at least 128MB
of RAM (256 is better) and a 300MHz Pentium II or 350MHz G3
processor. JBuilder also runs on the UNIX machines in Sweet Hall, if
you're clever.
Installing JBuilder
You can get JBuilder from Borland here.
You will have to sign up for their silly community and fill out a quick
survey form, but they will eventually allow you to download JBuilder for
free. We recommend you download the program itself and the documentation
(which includes a complete copy of the Java API docs).
Getting Started
Creating a New Project
To create a new project, select File|New Project. Pick the directory you
want to store the project folder in (e.g. C:\My Documents\CS108), and then
name the project (e.g. HW2Tetris). JBuilder will create a directory for
the project in the location you specified.
Adding Files
Create a src directory under your project directory. (If your project is
in C:\My Documents\CS108\HW2Tetris, this directory would be C:\My
Documents\CS108\HW2Tetris\src) Copy your project starter files, if any, to
this new directory. Within JBuilder, select Project|Add Files... and add
the starter files to the project.
Editing
The JBuilder editor is really slick. A couple nifty features:
Statement Completion (CodeInsight)
The editor is somewhat intelligent about what you're doing. Say you can't
remember the arguments to System.arrayCopy. Just type System.arrayCopy(
and wait for a second...the types and names of all the arguments will pop
up. This works not just for arguments, but also for method names, and it
works in both the Java libraries and your own code. Note, though, that if
there's some compile error on some line before the current one, CodeSense
won't work.
Revision Control
The editor keeps a bunch of backups of your work, so you can look back at
old versions and even just swap files out wholesale if you've made some
changes that didn't work out. WARNING: There are a limited number of
backups, so this feature does NOT replace a version-control system like
RCS or CVS.
Jumping Around
At the left you'll see a pane with the names of the classes defined in the
current file, and all of their members and methods. You can quickly skip
to the source code for a given method just by clicking on it in this pane.
Preparing to Run
Go Project|Project Properties... On the Run tab, choose the class whose
main() method you want to run. On the Paths tab, set the Working Directory
to be the directory containing any data files your program needs (this
will probably be the src directory since that's where you put your starter
files).
Running & Debugging
To run the program, select Run|Run. If you need to use the debugger (set
breakpoints, step through, etc.), use Run|Debug instead. To set a
breakpoint, just click in the margin to the left of the line where you
want the breakpoint. Once you're debugging, there will be tabs at the
bottom of the screen where you can look at all the local variables for all
of the functions on the call stack, set watches, enable/disable
breakpoints, etc.
Submitting
You can copy your entire project directory to UNIX using Fetch on Macs or
WS_FTP on PCs. Once there, just go to the src directory and you can run
all the UNIX commands you need to test and submit your code (rmclass,
javac *.java, etc.). Please submit from the src directory; we don't need
all the extra project files.
Using JBuilder on UNIX
Because it is written in Java, JBuilder can also run on UNIX. However,
because it uses some fancy features, it doesn't play nice with AFS on most
of the machines in Sweet Hall. (It takes about five minutes to bring up a
file-open dialog.) We'll describe a workaround, though, in case you want
to bring your JBuilder projects to office hours:
- Log in to one of the upstairs Sweet Hall machines.
- Type "ssh firebird". When prompted, enter your password. This will
remotely log you in to one of the machines downstairs. The firebirds
are PCs running Linux. Their AFS installation is limited, so
JBuilder plays nice with them.
- If you haven't run JBuilder6 on UNIX before, do the following:
- Add the directory /usr/class/cs108/bin/jbuilder6/linux/bin to
your path. (See Our Java On Unix
Page for details on how to do this.)
- Open the file /usr/class/cs108/bin/jbuilder6/license.txt in
xemacs
- Run jbuilder by typing "jbuilder" When asked for a
serial number or license key, choose license key, and copy/paste the
key from the license.txt file.
- To run JBuilder, type "jbuilder"
- Find and open your project file (it will have a .jpx extension) and
then use JBuilder just like you would at home!
- Remember, you're actually running JBuilder remotely on a Linux PC, so you'll
still need to run your project on the command line on a Solaris
machine before submitting.
JBuilder 3
We used to have an installation of JBuilder Foundation 3.0 on the Solaris
machines. We will likely be removing this installation in the near
future. We recommend that you use JBuilder 6 with the above workaround if
you want to develop on UNIX.
Last modified: Thu Feb 28 00:38:17 PST 2002