Integration between Java Applets and .Net dll

349 views Asked by At

I am new to java applets. My new task is to create a Java Applet that can call methods from C# .Net dll, i found the solution using UnmanagedExports here: UnmanagedExports

My applet works well when running it from NetBeans in the Applet viewer window and also when i embed the applet in a web page it works well. I tried to publish my web page that contains the applet on my local IIS and i faced the security issue but the problem was solved when i signed my applet

The Problem is: As i knew java applets run on clients PCs. How can it will access the DLL on clients PCs or how can i download the dll on clients PCs so that applet can find the dll in the proper location on each client pc. (I don't want to manually copy the dll on each client pc, i need the applet to download the dll somewhere on the client pc automatically).

1

There are 1 answers

0
Andrew Thompson On

Use Java Web Start to launch the applet. The natives should be in the root of a signed Jar that is referenced in a nativelib element in an OS specific resources section of the JNLP file.

If the natives are correctly jar'd and referenced, the Jar for the user's OS will be unpacked to a local location and placed on the run-time native path for the app.