lokesh
lokesh

Reputation: 11

How to use .dll in Java ME

I want to make use of dll in Java ME. Is there any way to do this?

I am working in j2me. Problem is j2me won't support jni (Java Native Interface). I need to have any tools to convert .dll to .jar

Upvotes: 1

Views: 1914

Answers (2)

aioobe
aioobe

Reputation: 421230

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.

Upvotes: 1

Michael Borgwardt
Michael Borgwardt

Reputation: 346486

You can call code in a DLL via the Java Native Interface, but that in no way constitutes "converting to .jar".

Upvotes: 0

Related Questions