Visual Basic Client example
All Examples COM Examples
Visual Basic client example
This example creates a Visual Basic client application
(source) to illustrate how a
non-Java client can use Java objects installed in the WebLogic server
using WebLogic COM. The Visual Basic project file (VBClient.vbp)
and form file (VBClient.frm) that were used to create the client
application (VBClient.exe) are included with this example.
Note that these files have been created with Visual Basic 6.0.
In this example, the Visual Basic client connects
to the WebLogic Server, obtains a handle to the EJB object created in the
and operates on the EJB object in accordance with user input. Before you try
to run this example, you'll need to compile and deploy the EJBean that
this example depends upon; please see the
and the WebLogic EJBean examples for
instructions. Make sure that you are able to successfully run the
bean-managed example before proceeding with this example.
This example requires that the Microsoft SDK 3.1
(or later) for Java is installed on the client computer.
To use this feature of WebLogic COM, you must also have several sets of Java
classes available on your client. Steps 1 - 2 should be completed only
if the client application will be running on a different computer than the
To build example:
Install the weblogic\classes directory on your client and add it to the client's CLASSPATH.
Install the weblogic\lib\weblogicaux.jar on your client and add it to your client's CLASSPATH.
Build the EJB used in this example on the client machine according
to the instructions in the
Set up a development shell that will use the Microsoft SDK for Java, as described in
- Add the EJB jar file to the client's CLASSPATH with the following command:
$ set CLASSPATH=%CLASSPATH%;weblogic\myserver\ejb_basic_beanManaged.jar
where weblogic is the WebLogic installation directory.
Register the WebLogic classes as trusted classes with
the following command.
$ jview weblogic.com.Export %CLASSPATH%
Start the WebLogic Server in a new command shell using the Microsoft SDK for Java.
In your development shell, start the Visual Basic client application with the following command.
From within the VBClient application, connect to the WebLogic Server by entering the
appropriate server URL:Port parameter and hitting the "Connect to server" button.
Enter an account number. If the account
does not currently exist, a new one will be created with an initial balance of $3,000.
- Copyright (c) 1999-2000 BEA Systems, Inc. All Rights Reserved.