Java Adapter
The Bridge offers the Java add-on to reuse Java classes within xUML services. It uses the Java Native Interface (JNI), a native programming interface for Java that allows Java code running inside a Java Virtual Machine (JVM) to interact with applications and libraries written in other programming languages like the xUML Runtime.
Each xUML service having imported Java classes and properties resource files will start its own Java Virtual Machine instance. Within the xUML service, class methods can be called without knowing the implementation details.
Java classes that are to be imported into the UML model need to apply to a small number of requirements, which will be explained on Requirements for Importing Java Classes.
Example Files (Builder project Add-ons\Java):
<your example path>\Add-ons\Java\uml\javaBlobs.xml |
To use the Java Adapter correctly, it is necessary that the Bridge uses the Java runtime environment version that comes with the standard Bridge installation. Please verify the preferences of the Java Adapter on the Bridge.
For details refer to Getting Started with the Java Adapter.
Regarding the examples: The JAR-files, from which the Java classes were imported, are located in the jarfiles directory of Builder project Add-ons/Java. The JAR files also contain the Java sources, which show how to write importable classes.