Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Visual J# / July 2004

Tip: Looking for answers? Try searching our database.

Does J# support JNI?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter Steele - 26 Jun 2004 21:40 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
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
........................................................................

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.