JBUILDER TUTORIAL
by Jenny Chang

California State University, Los Angeles
June 23, 2003

 

JBuilder Download & Installation

In order to program Java from home, you will need JBuilder.  JBuilder is available at no cost.  To obtain JBuilder, follow the following steps:

 

  1. Point your browser to http://www.borland.com/products/downloads/download_jbuilder.html
  2. Under Downloads section, click on the link for Personal Version 9 for Windows, Solaris, Linux Platform.
  3. On the window that pops up (Borland Account Login Prompt), click on the button for New User.
  4. On the registration form, complete the required information and make sure you type a valid email address.  For the company field, you can type Cal State LA
  5. Check your email account (the one that you used for the registration) and click on the link to activate your account.
  6. Point your browser to the link in step 1 again.
  7. Click on Personal Version 9 and click on the Submit button on the Terms and conditions window.
  8. Complete the Borland Survey
  9. Download the JBuilder 9 Personal for your operating system (e.g. Windows).  This will take some time to download because the file is around 67.9 - 79.6 Mb for Windows.  I strongly recommend you to download this software at school and save it in a zip disk unless you have a fast connection at home.
  10. After you finish downloading the software, check your email for the registration key.  It should be a text file.  Download the text file and save it on your computer. You will need this key to unlock the software so you can get started.
  11. Double-click on the setup file and follow the steps for installing JBuilder.
  12. When you finish the installation and first start using JBuilder, it will prompt you to enter the registration key to unlock the software.  Follow the steps to entering the registration key.
  13. Congratulations! You are on your way of starting Java programming.

 

 

JBuilder Getting Started

The following is a general guideline in getting started in any Java programming assignment.  Please note that the following steps may vary depending on the version of JBuilder that you use.

 

  1. Open JBuilder
  2. Click File à New Project…
  3. The Project Wizard dialog will appear.  Type a name for your project (e.g. project1)



  4. Click Next>
  5. Click Next> again
  6. On the last step, click on the Text field next to the Label field and type the information as shown in the following screenshot while replacing my name with your own name:


 

  1. Click Finish
  2. Congratulations, you have now created a project where all your Java files will reside in.  The next step is to create a Java file.

 

 

Creating Java a Source File

 

  1. While JBuilder is still open, click File à New…
  2. On the Object Gallery dialog window, click on the Class icon and click OK.



  3. The Class Wizard window will pop up.  Change the Class name to MyClass, then uncheck everything except for the Generate header comments option.
  4. Click OK.

 



  1. You should now have something similar to the following screenshot:



  2. We are now ready to write a simple hello world program.  Type the following code inside the class MyClass:



  3. Now, let us compile our Java program in order to run it.  Click on the Run Project icon
  4. The first time when you compile your Java program, the Runtime Properties window will appear.  You will specify which Java class contains the main method that we created above.  Note: If you ever need to change the runtime properties in the future, click on Project à Project Properties…
  5. Click on the ellipse button  to specify the class with the main method.
  6. Click on the + sign to expand the project1 package or folder, and click on MyClass to select the Java class.



  7. Click OK.
  8. Then click OK on the Runtime Properties window.
  9. If you have completed the above steps successfully, you should see the following output in your screen:



  10. Save your work, by clicking File à Save Project As…  (The shortcut for this is Ctrl+S).

 

 

Locating Your Java Source Files

Remember, it is always a good idea to backup your projects in a floppy or zip disk.  You are also responsible to periodically backup your projects for this class and any class that you take in the future.

 

  1. JBuilder projects are usually stored in a folder called jbproject.  To locate this folder, do a search by clicking Start à Search à For Files or Folders…



  2. In the Search for files or folder named field, Type jbproject. Then click on the Search Now button.  The search results should appear on the right window.



  3. Double-click on the jbproject folder to open it.
  4. There could be more than one folders within the jbproject folder.  But the folder of interest to us is the project1 folder.
  5. Double-click on the project1 folder.  In the folder you will be a bunch of files and folders, but only some are of interest to us.