I'm going to be writing a DLL in VS C++ that will be used by the Java team
here. They're using Sun Java and I'll structure the DLL so that the normal
JNI will work for them. I'd like to test my DLL though in J# but a simple
example seems to indicate J# may not support it. For example, I could not
get this code to compile:
class HelloWorld {
public native void displayHelloWorld();
static {
System.loadLibrary("hello");
}
public static void main(String[] args) {
new HelloWorld().displayHelloWorld();
}
}
This compiles of course under Sun Java. How do I do the same with J#?
Peter
Lars-Inge T?nnessen - 26 Jun 2004 22:35 GMT
> JNI
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vjsharp/html
/vjlrfunsupportedclasslibrariesapis.asp
(This one has in-process shared-memory communication support)
http://www.jnbridge.com/
http://j-integra.intrinsyc.com/
Regards,
Lars-Inge T?nnessen
www.larsinge.com
Lars-Inge T?nnessen - 26 Jun 2004 23:17 GMT
You can also use P/Invoke or J/Direct in the .net framework to access native
code from J#.
Lars-Inge
George Birbilis [MVP J#] [9880] - 27 Jul 2004 12:53 GMT
> I'm going to be writing a DLL in VS C++ that will be used by the Java team
> here. They're using Sun Java and I'll structure the DLL so that the normal
[quoted text clipped - 15 lines]
>
> This compiles of course under Sun Java. How do I do the same with J#?
you can use interfaces for the pure Java code to talk to and have different
implementations for Java (using JNI) and J# (using P/Invoke or whatever) if
your code needs to work in both Sun Java and J#
hope sometime in the future the J# team (or other company) will add some JNI
support to J#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
George Birbilis <birbilis@kagi.com> [Microsoft MVP J#]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ QuickTime VCL and ActiveX controls (for PowerPoint/VB/Delphi etc.)
+ Plugs VCL and ActiveX controls (InterProcess/Internet communication)
+ TransFormations, VB6 forms to ASP.net WebForms convertion
http://www.kagi.com/birbilis
+ Robotics
http://www.mech.upatras.gr/~robgroup
........................................................................