Speed coding and debugging with an integrated, extensible source code editor, graphical debugger, compiler, visual designers, timesaving wizards, sample applications, and support for Java standards. Get started quickly using the included tutorials. Develop on the Windows, Linux, and Solaris platforms. Rapidly build Java applications using the Borland AppBrowser™ integrated development environment, refactorings, build and configuration management tools, CVS version control, and Two-Way-Tools™. Easily create JavaBeans with BeansExpress™. Speed coding and reduce syntax errors with CodeInsight™ and ErrorInsight™ technologies.
Many developers prefer to learn by doing. If this is you, follow the steps outlined in this tutorial to learn about using JBuilder's integrated development environment (IDE) to create applications. The tutorial shows how to
The JBuilder integrated development environment (IDE) consists of a window that contains several panes and panels for performing most development functions: editing, visual designing, navigating, browsing, comparing, modeling, building, compiling, debugging, and running. This window is the JBuilder AppBrowser.
Before creating an application in JBuilder, you must first create a project
to work in. JBuilder uses a project file with a .jpx extension to
organize the application files and maintain the settings and project properties.
The Project wizard can create a project HelloWorld for you.
Note: As you type the project name in the Name
field, the same name is entered in the Directory field. By default, JBuilder
uses this project name to create the project's directory name and the
package name for the classes. The package name is forced to lowercase
according to the Java convention for naming packages. Projects in JBuilder
are saved by default in the /<home>/jbproject/ directory.
The home directory varies by platform.
jpx as the project file type. When you check this option, the Project wizard creates an HTML file for project notes and adds it to the project.
Step 1 of the Project wizard should look similar to this:


Step 2 of the Project wizard should look similar to this:
Note: The information in the class Javadoc fields appears in the project HTML file and as optional header comments in the source code.
Step 3 of the Project wizard looks similar to this:

Two files, HelloWorld.jpx and
HelloWorld.html, are generated by the wizard and appear in
the project pane located in the upper left of JBuilder's AppBrowser.
HelloWorld.html, the project notes file,
to view it in the content pane located in the center of the AppBrowser. Note
that it contains the project name, author, company, and description
information you just entered in Step 3 of the Project wizard. The Project For Existing Code wizard allows you to create a new JBuilder project using an existing body of work. When you use this wizard, JBuilder scans the existing directory and builds paths that are used for compiling, searching, debugging, and other processes. Any JAR or ZIP files that aren't already in libraries are placed in a new library and added to the project. Project libraries are listed on the Required Libraries tab of the Paths page of Project Properties (Project|Project Properties).
To access the Project For Existing Code wizard,
Step 1 sets your project directory, name, type, and project template.
The project template provides default values for the settings described in the Project Properties dialog box (Project|Project Properties). If you already have a JBuilder project whose project properties are close to what is required in the new project, select it here. This minimizes the repetitive work involved in setting up a new project within an established environment.
Steps 2 and 3 of the Project For Existing Code wizard are identical to the Project wizard.
If your project requires specific libraries, you can add them to the project on the Paths page of the Project Properties dialog box. To set the main class to run your project, choose the Run page of the Project Properties dialog box.
There is one way to open an existing project for the first time: use File|Open Project. There are two ways to open an existing project you have opened before: either the File|Open Project command or the File|Reopen command.
To open a project using the File|Open Project command,
To open a previously opened project with the File|Reopen command,
To open a file in the content pane, you may do one of four things:
To view a project in a new AppBrowser,
If you have more than one AppBrowser open and the same files open in multiple AppBrowsers, changes you make in one AppBrowser will be reflected immediately in the same file open in the other AppBrowser. This keeps all your working versions of a file congruent.
Note: All open projects are available in all
AppBrowsers from the Project drop-down list.
The Application wizard creates .java source files that are added
to the project you just created.
To generate source files for your application using the Application wizard, follow these steps:
![[Object Gallery]](introToJBuilderTutorial_files/objectgallery_new.gif)
helloworld, in Step 1 of the
Application wizard.
By default, the wizard takes the package name from the project file name,
HelloWorld.jpx.
This is a case-sensitive Java class name.
When you select this option, the project notes information you entered in Step 3 of the Project wizard appear at the beginning of each source file that the Application wizard generates.
Step 1 of the Application wizard should look like this:
![[Application Wizard Step 1]](introToJBuilderTutorial_files/hello_AppWiz1.gif)
This text appears in the title bar of the frame in your application.
Step 2 of the Application wizard should look like this:
![[Applet Wizard Step 2]](introToJBuilderTutorial_files/hello_AppWiz2.gif)
The new .java source files and toolbar images are added to
your project and displayed as nodes in the project pane. The source code for
HelloWorldFrame.java is open in the content pane as shown in the
following image.
The message pane appears only when a message is displayed. Therefore, you won't see the message pane yet if you are following these steps.
Note: Step 3 (defining and creating a new runtime application configuration) is skipped because it isn't a necessary to create a new application configuration for your HelloWorld application.
Note: An automatic source package node named
helloworld also appears in the project pane if the Enable Source
Package Discovery And Compilation option is enabled on the General page of the
Project Properties dialog box (Project|Project Properties).
AppBrowser elements
![[AppBrowser]](introToJBuilderTutorial_files/hello_appbrowser.gif)
Note: The source files are saved to:
/<home>/jbproject/HelloWorld/src/helloworld.
The class
files generated from the source files by the Java compiler are saved to:
/<home>/jbproject/HelloWorld/classes/helloworld.
If you don't select any application feature, choose File | New Class.
For example #2, we are going to create a new project named
myproject in c:/Ruby/TA directory:
myprojectc:/Ruby/TA/myprojectc:/Ruby/TA/myproject/classesc:/Ruby/TA/myproject/bakc:/Ruby/TA/myprojectc:/Ruby/TA/myproject/srcc:/Ruby/TA/myproject/test1
not
attributablemyclass c:/Ruby/TA/myproject directory, the
myproject.jpx file is created.
In the project pane, you'll see the project file and the source file that now belongs to the project.

You can also add a new empty file to the project; choose File | New
File, specify the new file name and type, and choose OK.
You can change information in the About box by directly editing the code. The default application version created by the Application wizard is version 1.0.
HelloWorldFrame_AboutBox.java in the project
pane to open the file.
The content pane changes to the source view where you can edit the code in the editor.
String version = "1.0";
The editor finds the selected text.
![[Hello World code]](introToJBuilderTutorial_files/hello1_helpcode_step6.gif)
1.0 and enter 2.0 inside the quotes. Now, compile and run the application. Compiling is the process of running the
Java compiler. The compiler, which translates source code into Java bytecode,
generates .class files.
Tip: You can also select
HelloWorldClass.java in the project pane, right-click, and choose
Run using "HelloWorldClass".
First, the message pane opens displaying the run process. Then, your application is displayed and should look like this:
![[Hello World application]](introToJBuilderTutorial_files/HelloApp.gif)
Note: The running application shown above reflects the Metal Look & Feel.

To run your project, choose Run | Run Project or click Run Project button from the menu. The Runtime Configuration Properties dialog box appears. Select main class for your project from the pop-up window.

Click OK, the result will be shown in the message pane.

To set the main class and VM parameters for your project, go to the Run page of the Project Properties dialog box (Project | Project Properties or Run | Configurations ).
There is a very good tutorial about Compiling, running, and debugging in the Help | Tutorial. It is located at Contents | Builing Applications with JBuilder| Tutorials: Building Applications | Tutorials: Compiling, running and debugging. This step-by-step tutorial shows you how to start and stop the debugger, set a breakpoint, step into and step over a method, and set a a local variable watch to find and fix syntax errors, compiler errors, and runtime errors.
You can also run the application outside the JBuilder environment from the command line.
Note: The <jdk>/bin/ directory
which contains the java command must be on your path. If
java is on your path, when you type java at the
command line, information explaining the command should display. If it's not on
your path, you need to run the application from within the
<jdk>/bin/ directory.
To run the application, assuming java is on your path,
java -classpath /<home>/jbproject/HelloWorld/classes helloworld.HelloWorldClass
Note: For Windows, use a backslash (\).
This command should be in the following form:
java -classpath classpath package-name.main-class-name
In this example,
java = the launcher for the Java application.
-classpath = an option that sets the search path for
application classes and resources.
/<home>/jbproject/HelloWorld/classesclasses directory was set as the output path for
compiled classes on Step 1 of the Project wizard.
<home> = your home directory, for example,
c:\winnt\profiles\<username>
helloworld
HelloWorldClassYou can debug both local and distributed applications, including servlets, JSPs, applets, EJBs, and unit tests. To debug files in your project, choose Run | Debug Project. Your program may be compiled. When debugging, you can view threads and data values and control your program's execution. The debugger UI, consisting of the debugger views, the toolbar, the session tab and the status bar, is displayed in the message pane.

The tutorial about Javadoc is located at Help | Building Applications with JBuilder | Building Applications | Creating Javadoc from source files.
The Archive Builder collects all the files needed to distribute your program and can archive them into a Java archive file (JAR file).
To deploy your application:
![[Archive Builder Step 1]](introToJBuilderTutorial_files/hello1_archivebuilder1.gif)
Note that HelloWorld.jar will be saved to the
HelloWorld directory.
![[Archive Builder Step 2]](introToJBuilderTutorial_files/hello1_archivebuilder2.gif)
An archive node called Application appears in the project
pane. You can modify this file by right-clicking and selecting Properties.
The Archive Builder gathers all the files in the project's output path (Project|Project Properties|Paths) into the JAR file.
Application archive node to
expand the node and see the HelloWorld.jar archive file. The manifest file appears in the content pane and the contents of the JAR file appear in the structure pane.
