0

Below is my HTML code

<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<applet codebase ="." code="CallApplet.class"
        archive="CallApplet.jar,jna.jar,platform.jar"
        height="100" width="100"/>
</body>
</html>

Above html file and all jars are in same folder

What am i doing wrong here, i m getting error java.lang.NoClassDefFoundError: com/sun/jna/Library

If you want to look into my applet code go to Applet runs in eclipse but not in browser - java security

UPDATE

I needed to sign all external jar files [jna and platform]

now i m getting error - java.lang.UnsatisfiedLinkError: Unable to load library 'TSCLIB': The specified module could not be found.

Basically this error is as it is trying to access a DLL file which is placed inside system32 folder. Can anybody help on this

Community
  • 1
  • 1
Sudesh
  • 1,129
  • 3
  • 14
  • 29

1 Answers1

-1

I think i learned couple of things about JNA with applet

  1. First verify all jars with jarsigner whether they all are signed properly.

  2. In my case eclipse ran with 64bit JVM (so applet ran fine within it) and chrome ran with 32bit so i had to use different dlls for different JVMs. Also i placed dll files outside system32, say c: and loaded it using absolute path via System.load (I believe this can be dynamic).

Hope this will help others when developing applet with JNA

Sudesh
  • 1,129
  • 3
  • 14
  • 29