BEA Logo BEA WebLogic Server Release 5.0

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

Coming Soon: JBuilder 3.5

Using Borland's JBuilder with WebLogic

Configuring JBuilder

Configuring JBuilder

Here are a few tips for using Borland's JBuilder 2.0 IDE and runtime environment with WebLogic software. You will need to do some minor configuring of your system to use JBuilder. Here is how to set up the JBuilder IDE.

  • Start JBuilder, and modify the project classpath to include the necessary WebLogic libraries:

    1. From the Tools menu, select Default Project Properties.

    2. Beside the Java libraries list, click the Libraries... button.

    3. In the window Available Java Libraries, press New....

    4. In the Name field, type "WebLogic".

    5. Click the "..." button by the Class Path field.

    6. Click Add Path, and browse to the \weblogic\classes directory and select it.

    7. Click Add Zip/Jar, and browse to the \weblogic\lib\weblogicaux.jar and select it.

    8. Press "OK" to close the Available Java Libraries window. JBuilder will scan the packages before closing the window.

    9. Beside the Java libraries list, click the Add... button.

    10. In the window Select a Java library to add, select the WebLogic library that you just created .

    (If you have any existing projects, you will need to modify their project properties using the Properties menu item of the File menu.)

  • Build a sample applet or application to test your database connectivity, or use one of the applets from the examples in the WebLogic distribution.

  • Set up the connection to your database.

    In the JBuilder properties menu, click on "connection" and bring up the "connection" dialog box.

    The examples that follow are for an Oracle database connection, where nameOfDB is the Oracle TNS alias name of the database, and WebLogicHost:Port is the WebLogic Server's host machine and port at which WebLogic is listening for client login requests. (See WebLogic JDBC Options for links to other supported databases).

    For a multitier connection:

      Connection URL=jdbc:weblogic:t3:oracle:nameOfDB?
      Driver Class

    For example, here is the URL for connecting to an Oracle database "emp" on port 7001 of the WebLogic Server host "":

      Connection URL=jdbc:weblogic:t3:oracle:emp?
      Driver Class

    For a two-tier connection (from a Java application to a database):

      Connection URL=jdbc:weblogic:oracle:nameOfDB
      Driver Class

    You can test the connections to the database using the connection dialog box. If you have everything set up correctly, you should get a success message.

  • Test a query.

    Load a query data set and make a select statement to verify connections. Then drop a grid onto JBuilder's Design tool and tie it to your query data set. While in the Design mode you should see your query data populated in JBuilder's grid box.

  • Run the applet to test it.


Some of our customers have reported problems using JBuilder to compile tutorials and other sample code that are part of the WebLogic 3.0 release, related to a feature in the JBuilder IDE called "Smart Dependencies Checking." This utility checks the dependencies for every class that it finds and tests all of the dependencies in all of the WebLogic classes, even though these classes are not required to compile sample code. Importing even a single WebLogic package that refers to third-party classes, such as the Visibroker CORBA classes, will cause this problem.

There is no way to to disable the "Smart Dependencies Checking" feature when using the JBuilder IDE, but there are two options for working around it:

  • Use BCJ (supplied with JBuilder) to compile all of the tutorials from the command line, rather than using the compiler within the IDE. BCJ does not use Smart Dependencies Checking.

  • Create a .zip file with a select subset of the WebLogic classes that you need for your WebLogic application for use with the IDE and its default compiler. Exclude the CORBA classes or other third party classes from the .zip file; include just the WebLogic classes you need to compile your code. You can use this .zip file with the default JBuilder compiler.

If you do not have a .zip file utility available, create a .jar file with the manifest disabled, which will function the same as a .zip file. Here is an example of the syntax:

 $ jar cvfM jarFile.jar *.class

where jarFile.jar is the name of the .jar file to be created and *.class is a file description of the classes needed to compile your application. The "M" creates a .jar file with the manifest disabled.

Once the .zip or .jar archive is created, follow these steps to add it to your JBuilder environment as described above.

For more information useful for working with JBuilder, see Using URLs to set properties for a JDBC Connection and Testing connections.


Copyright © 2000 BEA Systems, Inc. All rights reserved.
Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher.
Last updated 03/30/2000