ACG's Soft Chip Technology examines
Java byte code to produce monolith C code for compact embedded systems.
This is the process flow Labeled 1 in the figure. As a variation, Java
Byte Code is examined to determine the interfaces needed to be exposed in
a Windows environment. The Java byte code is first converted to C
then an
interface wrapper is automatically added to implement Idispatch,
(including the TLB and IDL files generated by examining the Java byte
code).
The resulting C code is then compiled in a Windows development
environment.
The Java Byte code is thus successfully converted to a functionally
equivalent native Windows COM object capable of running in process and
without a JVM. This is the process flow labeled 2 in the figure.
We also experimented with another approach - to run the Java Byte Code in
a JVM with Remote Procedure Calls (RPC) between the Java application and a
COM interface in the Windows application. A thin interface layer is
produced that makes an out of process call to the Java application. In
this case, the Java Byte code is examined to generate the interface
wrapper to the RPC call. This is the process flow labeled 3 in the figure
above.
From the perspective of the Windows based development environment, cases
2,3 are functionally identical. However case 2 is more efficient because
a) there is no overhead of a JVM and b) In process calls are significantly
faster than out of process calls because of the overhead associated with
marshalling.
To validate our approach, ACG wrote some Java classes that were then
converted to COM objects running within VB. The outputs of the the Java
classes to those produced by the VB program were compared.
For more information:
1- Review documents: www.advancedcybernetics.com/publications/J2COMDEMO.pdf
2- Example Demonstration: www.advancedcybernetics.com/publications/J2COMDEMO.ZIP
|