Using Java Classes from C#
I am working on a project which allows Java classes to be used from C#. We are doing this by using .NET remoting using Runtime bridging for communication between the two platforms.
Well one of the imp. module of our project is proxy generator tool.
The Proxy-generator tool generates proxy classes for the actual Java classes. These proxies act as interfaces between the .Net code and the Java classes. The .Net code only accesses these interfaces that run in the CLR thus making Java objects appear as CLR components. Input to the proxy generator tool will be the Java classes to be used in .Net either as individual files or in a JAR file. For each individual class, the tool will generate a .Net based proxy class with the same name as the original Java class and the methods in each proxy will correspond to the methods in the actual Java class. All generated proxies will be written out to a .Net DLL, a reference to which will be added to the .Net side code. Both Java and .Net have API’s designed to create proxy classes. However certain modifications will be needed to generate .Net based proxies for Java classes.
Well the problem we r facing is that how we can create the proxies for the acutal Java classes. And what information will be stored in this file. Coz we cant use the proxies generated by the .NET Remoting we need a custom generator. If some one knows what the .net remoting proxies are and what they actually contain then that might help us a lot. Coz we have to do something similar to that.
Time to play the GAME!