Have a Question?
Print

01169: Enabling java classes to be used as Client Objects in BBj

Title:

Enabling java classes to be used as Client Objects in BBj

Description:

Any Java classes and any native code that the Java classes depend on that are to be used as client objects in BBj must reside on the client machine and on the server. 

On the server machine the classes should be in a jar or directory which is specified in the BBjServices CLASSPATH, this can be set using the Enterprise Manager. 

The classes must also exist on the client in a registered jar (see ‘Jar Registration’ in the documentation) or the license must contain a SAM License Feature line or a developer license (DVK) must be used. If none of these conditions are met, a nag message will appear. If the client is running BBjServices, the registered jar must also be in the client’s BBjServices CLASSPATH, which a can be set using the Enterprise Manager. If the client is a Web Start client the JNLP file must specify all necessary jars – including jars with native code – to be downloaded to the client. These jars must be signed and placed in the directory specified by the JNLP.

Resolution:

For example, in order to run the Launch Dock Demos, which use Java client objects and where some classes depend on native code, the following is done: 

1) Add Jars that contain the java classes that are to be uses as client object to the server’s BBjServices CLASSPATH. Note: In a typical BBj install, the Launch Dock jars are indexed by the BBjIndex.jar and so are already in the CLASSPATH. 

For the Launch Dock demos, this includes the following jar files found in the BBj install directory (when the demos are installed): 

BBjThinClient.jar (BBj Jar) 
ThirdParty.jar (BBj Jar) 
FontChooser.jar (BBj Jar) 
BBjIndex.jar (BBj Jar) 
DemoClientFiles.jar 
ClientObjects.jar 
examples.jar 
jfreechart-experimental.jar 
jna.jar 
swingx.jar 
TimingFramework.jar 
jdic.jar 


2) Make sure any native code that these Java classes depend on is in the <bbj install dir/lib directory. For the Launch Dock demos, the BBj installer handles this by installing the following files for Windows: 

jdic.dll 
IeEmbed.exe 
MozEmbed.exe 

3) Register all non-BBj Jars listed in number 1 so that they can be used on the client without being in nag mode, or get a Developer’s license (DVK) from BASIS. 

4) If the client is running BBjServices, add all the jars listed in step 1 to the BBjServices CLASSPATH via Enterprise Manager (for the Launch Dock demos, this is already done). Skip steps 5-7. 

5) If the client is running in Web Start, add all native code for each client platform to be run to a jar. 

example: <jdk install dir>/bin/jar cvf win32-native.jar jdic.dll IeEmbed.exe MozEmbed.exe 

6) If the client is running in Web Start, add all jars listed in step 1 and the jar created in step 5 to the JNLP file: 

href=”LaunchDock.jnlp”> 
<information> 
<title>Launch Dock Demo</title> 
<vendor>BASIS International Ltd.</vendor> 
<description>LaunchDock</description> 
<icon kind=”splash” href=”BBjEnv.bmp”/> 
</information> 
<security> 
<all-permissions/> 
</security> 
<resources> 
<j2se version=”1.6+” inital-heap-size=”256m” max-heap-size=”256m”/> 
<jar href=”BBjThinClient.jar”/> 
<jar href=”ThirdParty.jar”/> 
<jar href=”FontChooser.jar”/> 
<jar href=”BBjIndex.jar”/> 
<jar href=”DemoClientFiles.jar”/> 
<jar href=”ClientObjects.jar”/> 
<jar href=”examples.jar”/> 
<jar href=”jfreechart-experimental.jar”/> 
<jar href=”jna.jar”/> 
<jar href=”swingx.jar”/> 
<jar href=”TimingFramework.jar”/> 
<jar href=”jdic.jar” /> 
</resources> 
<resources os=”Windows”> 
<nativelib href=”webstart2166.jar”/> 
<nativelib href=”win32-native.jar”/> 
</resources> 

<application-desc main-class=”com.basis.bbj.client.comm.Web StartLauncher”> 
<argument>-tT2</argument> 
<argument>-c”/usr/local/bbj/demos/config.bbx”</argument> 
<argument>-WD”/usr/local/bbj/demos/Workbench”</argument> 
<argument>-RHSERVER_NAME_HERE</argument> 
<argument>-INFSERVER_NAME_HERE</argument> 
<argument>DemosLaunchDock.bbj</argument> 
</application-desc> 
</jnlp> 

7) Sign all jars and put them in the directory as specified in the JNLP. 



Last Modified: 11/17/2011 Product: BBj Operating System: All platforms

BASIS structures five components of their technology into the BBx Generations.

Table of Contents
Scroll to Top