Results 1 to 10 of 10
- 03-11-2012, 08:14 PM #1
Senior Member
- Join Date
- Feb 2010
- Posts
- 128
- Rep Power
- 0
Need a bit of clarification on JNI
Hi Java users,
I have a scanner device which does not have a Java driver. However, it has a .NET API and a .h file. Ive used the .NET API for writing a Windows service, which works.
I would like to use the device on MACs, so I thought of writing java application.
I've heard of the JNI. Am I thinking right that with JNI I could call methods from the .h file. Or is there a way for me to somehow to make this work?
ThanksMeasuring programming progress by lines of code is like measuring aircraft building progress by weight.
-
Re: Need a bit of clarification on JNI
JNI will not work nicely with .NET compiled libraries, but there are utilities out there on the net that can help you (whose names escape me at the moment).
- 03-11-2012, 09:06 PM #3
Senior Member
- Join Date
- Feb 2010
- Posts
- 128
- Rep Power
- 0
Re: Need a bit of clarification on JNI
I also have the .dll which is Windows API. is there a way I could utilise that? Through JNI or JNA?
Measuring programming progress by lines of code is like measuring aircraft building progress by weight.
-
Re: Need a bit of clarification on JNI
- 03-11-2012, 10:11 PM #5
Senior Member
- Join Date
- Feb 2010
- Posts
- 128
- Rep Power
- 0
Re: Need a bit of clarification on JNI
I can't seem to find a JNI API download. I am still a bit confused as to how the JNI works. All information I've been reading explains that I need to write implementations in java and build a .h using javah. Seems very convoluted. :S
Measuring programming progress by lines of code is like measuring aircraft building progress by weight.
-
Re: Need a bit of clarification on JNI
JNI is part of core Java, and so no download is needed. JNA on the other hand will require that you download some jar files and then place them in your project's classpath.
If you're very familiar with C, then it's pretty straight-forward. I'm not, so I try to use JNA which I find much simpler to use.I am still a bit confused as to how the JNI works. All information I've been reading explains that I need to write implementations in java and build a .h using javah. Seems very convoluted. :S
- 03-11-2012, 10:27 PM #7
Senior Member
- Join Date
- Feb 2010
- Posts
- 128
- Rep Power
- 0
Re: Need a bit of clarification on JNI
I have downloaded the JNA API, but for some reason my IntelliJ can't seem to understand it after I add it as a library :S
Measuring programming progress by lines of code is like measuring aircraft building progress by weight.
-
Re: Need a bit of clarification on JNI
- 03-11-2012, 10:36 PM #9
Senior Member
- Join Date
- Feb 2010
- Posts
- 128
- Rep Power
- 0
Re: Need a bit of clarification on JNI
Thanks, for your help, Fubarable. I've downloaded the API again and it solved the issue. Now just need to find examples of how to make it work :)
Thanks againMeasuring programming progress by lines of code is like measuring aircraft building progress by weight.
-
Re: Need a bit of clarification on JNI
Similar Threads
-
Help Clarification of code
By deemu in forum New To JavaReplies: 1Last Post: 02-06-2012, 01:53 PM -
Clarification of FileOutputStream
By rogi85 in forum New To JavaReplies: 4Last Post: 08-03-2011, 12:02 PM -
Struts Clarification
By vinothkumarrvk in forum Web FrameworksReplies: 0Last Post: 02-26-2010, 02:24 PM -
need clarification in this statement.
By Unsub in forum New To JavaReplies: 5Last Post: 02-26-2010, 01:16 PM -
HELP! need clarification
By ptsofathrty in forum New To JavaReplies: 1Last Post: 12-16-2008, 08:02 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks