-1

I´m working with a pad wacom stu520, i built an applet to get images from wacom pad, but suddenly i became to recieve following error on java console

Exception in thread "AWT-EventQueue-1" java.lang.UnsatisfiedLinkError:               C:\Users\hbernal\AppData\Local\Temp\jna8619986156059459306.tmp: Acceso denegado
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1807)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1003)
at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:609)
at com.sun.jna.Native.loadNativeLibrary(Native.java:550)
at com.sun.jna.Native.<clinit>(Native.java:87)
at au.com.vinae.jstutablet.JSTUTablet$CLibrary.<clinit>(JSTUTablet.java:1082)
at au.com.vinae.jstutablet.JSTUTablet.isConnected(JSTUTablet.java:340)
at au.com.vinae.jstutablet.JSTUTablet.StartCapture(JSTUTablet.java:441)
at co.com.compuline.sign.AppletFirma$1.mouseClicked(AppletFirma.java:307)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)

I´m loading dll´s with this code snipet

static{
    try{
        System.load("zlib1.dll");       
        System.load("libeay32.dll");                        
        System.load("STUTabletCore.dll");       
    }catch(Exception e){
        e.printStackTrace();
    }
}

I use on my lib jna.jar, jSTUTablet.jar, commons-io-2.1.jar, commons-codec-1.6.jar, i´m using java SDK 1.6.0_37 on Eclipse Kepler.

Thanks in advance

Hernan Bernal
  • 39
  • 1
  • 7
  • What is the HTML used to load the applet? Can we visit the page? Shouldn't `System.load("zlib1.dll");` be `System.load("zlib1");`? – Andrew Thompson Jul 13 '13 at 04:41
  • no matter whether applet is run inside JSF page or run alone, same problem is present – Hernan Bernal Jul 15 '13 at 13:51
  • *"no matter whether applet is run inside JSF page or run alone, same problem is present"* If I'd asked "Is it the same behavior when launched with JSF or without?" (which I didn't) that might be a valid & useful reply. I was interested in seeing the class-path as understood by the browser.. – Andrew Thompson Jul 15 '13 at 13:56

1 Answers1

0

Thanks Andrew:

Finally i found the issue, jna was creating tmp files into a folder where my user haven´t permissions, i have two solutions

  • change java.io.tempdir
  • request permissions for my user

Both of them worked like a charm

See ya

Hernan Bernal
  • 39
  • 1
  • 7