all groups > vj# > june 2004 >
You're in the

vj#

group:

Does J# support JNI?


Does J# support JNI? Peter Steele
6/26/2004 1:40:51 PM
vj#:
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

Sorry, No Lars-Inge Tønnessen
6/26/2004 11:35:25 PM

[quoted text, click to view]

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

Re: Does J# support JNI? Lars-Inge Tønnessen
6/27/2004 12:17:20 AM

You can also use P/Invoke or J/Direct in the .net framework to access native
code from J#.


Lars-Inge

Re: Does J# support JNI? George Birbilis [MVP J#] [9880]
7/27/2004 2:53:47 PM
[quoted text, click to view]

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
.........................................................................

AddThis Social Bookmark Button