hi, i how can i want to make use of dll in java. is there any way to do this
+1
A:
You have to go through JNI: Java Native Interface.
Have a look at calling from a .dll using Java and JNI / Making Native Windows API calls from within a Java Application .
A jar-file is nothing more than a ZIP-file containing Java-class-files. If you have a .dll it will typically contain Windows-specific method calls etc, which have no counterpart in the Java-API (especially not in the J2ME API :-), so, the unhelpful answer is: no, there is no way you can convert a .dll to a .jar that could be used in your J2ME application.
aioobe
2010-06-04 10:10:02
thank you. i am aware of jni. my problem is in j2me i want ot use,j2me wont support jni. if i can have any tools to convert .dll to .jar it will be more useful.
lokesh
2010-06-04 10:16:23
Your cell-phone does not provide a way to access the underlying system natively, you can only execute within the JVM, thus there is no way to execute native code on the cell phone. And even if you could, your native code in the dll would not make sense to the cell-phone system anyway.
aioobe
2010-06-04 10:48:55
A:
You can call code in a DLL via the Java Native Interface, but that in no way constitutes "converting to .jar".
Michael Borgwardt
2010-06-04 10:10:51
thank you michael. I am working in j2me. it wont support jni. so i need to have any tools to convert .dll to .jar
lokesh
2010-06-04 10:18:07