Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to use Java to create dll?

Tags:

java

dll

Want to create animation dll for Window XP Is it ok to create Java2d animation and export as dll??

like image 508
Superhero Avatar asked Nov 20 '09 15:11

Superhero


People also ask

What language is used for DLL?

DLL files use languages like C or C++, although you'll see C++ more often. You can write your own DLLs to run some code you need if you're willing to learn how to do it.

What is DLL file in Java?

Dynamic Link Library (DLL) is Microsoft's implementation of the shared library concept. A DLL file contains code and data that can be used by multiple programs at the same time, hence it promotes code reuse and modularization. This brief tutorial provides an overview of Windows DLL along with its usage.

Can we use .NET DLL in Java?

Solution Summary Developer should create Java Applet code as a JAR file. All custom . NET DLLs to be used (those that are not included in . NET Framework) should be included within that Java applet JAR archive.


2 Answers

Yes. You need to write code in C++ to start the JVM with the invocation interface to JNI, and call into it. However, you may find it difficult to create windows in this way that integrate seamlessly with your Windows environment application to display your animation. This is a rather advanced JNI usage, and I'd recommend reading the JNI book before even trying a little bit of it.

like image 109
bmargulies Avatar answered Sep 21 '22 22:09

bmargulies


I am pretty sure you can only create .Jar files from java not dlls

like image 43
James Avatar answered Sep 17 '22 22:09

James