Example process
CJDBounce
is used for this example. The Eclipse project
and cloverleaf site are located under $HCIROOT/JavaDriverSamples.
- Open Eclipse and create the JavaDriver project by importing the existing project from $HCIROOT/JavaDriverSamples/eclipseprojects/CJDBounce.
-
Add JavaDriver.jar to the
project library.
- Open Window > Preferences and on the Java > Build Path > ClassPath Variables panel click New.
- For Name, specify JAVADRIVER_LIB.
- Click File and locate the $HCIROOT/lib/java folder in the sample folder structure, select the Java Driver jar, and click OK.
- Edit and test your code as required.
-
Create a jdwp (Java debug wire protocol) configuration for
JavaDriver testing:
In the project, select Run > Debug Configurations. In the Remote Java Application Connect tab, specify:
- Project: CJDBounce
- Connection Type: Standard (Socket Attach)
- Host: hostname
- Port: 7013
- Click Apply.
-
Create a .jardesc (exportCJDBounceJar.jardesc) file to build/deploy the
jar file to the target directory.
To do this:
- Select the project, then right-click Export.
- In the Export dialog box, export a jar file, and click Next.
-
In the JAR Export dialog
box, specify the necessary information:
Select Export generated class files and resources.For jar file, specify CJDBounce.For Options, select Compress the contents of the JAR file.
-
Click Next.
Select Save the description of this JAR in the workspace, and specify the file name.
-
After the file has been created, it is only necessary to select the
.jardesc file and click Create JAR from the right-click
menu.
The Java Class is found in the $HCISITEDIR/thread_name directory where Cloverleaf loads it.