JApplet + JNI working only in Safari

N

nair

Hello techies,
I've developed an applet which is signed and also loads 3rd party
dll's runtime. I'm using JNI to link my DLL's with
JScript.

To my surprise the platform independent JVM fails to load my DLL in
most of the browsers except Safari. In safari the behavior is as
expected. Indeed one of the dll is getting loaded but a second Java
method invokes a call which resides in an indirect DLL. It is there
where the jar fails.

This problem is bugging me since I've started using JApplet. I'd
appreciate if anyone can guide me on the internals of using JApplet
on
different browsers.

Thanks & Regards,
Anoop SL
 
R

Roedy Green

I've developed an applet which is signed and also loads 3rd party
dll's runtime. I'm using JNI to link my DLL's with
JScript.

Applets and JNI do not mix well. The problem is getting the JVM to
find your DLL. Most likely that is the problem. Consider
implementing it as a Java Web Start app. It just requires writing a
*.jnlp file, and leaving everything else as is. Then the JWS will
handle the problem of installing the DLL and making it accessible.

see http://mindprod.com/jgloss/javawebstart.html

If you wish to persist in your Sisyphusian task, see
http://mindprod.com/applet/wassup.html

to find out the path where the DLLs have to live, then go about
getting your DLL installed there. It is a bitch. Sometimes installing
is not sufficient. You must install BEFORE the browser starts up, at
least that's the way Netscape used to work.

I had similar problems with the SetClock Applet and JNI. I eventually
gave up and turned it into a Java Web Start app.

See http://mindprod.com/webstart/setclock.html
 
R

Roedy Green

Applets and JNI do not mix well. The problem is getting the JVM to
find your DLL.

The other problem is selecting the correct dll/so etc. for the
particular platform. Java Web Start does that for you automagically.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top