Hi everyone.
I encountered a little problem when trying to run an applet with embeeded ocx. The code works well when running via appletviewer, but when i try to run it via web page, i get error like this:
com.jniwrapper.JNIWrapperException: java.io.FileNotFoundException: C:\DOCUME1\Tomek\LOCALS1\Temp\sample.jar\jniwrap.dll (The process cannot access the file because it is being used by another process)
at com.jniwrapper.JNIWrapperException.createException(SourceFile:60)
at com.jniwrapper.JNIWrapperException.throwException(SourceFile:53)
at com.jniwrapper.DefaultLibraryLoader.a(SourceFile:352)
at com.jniwrapper.DefaultLibraryLoader.findLibrary(SourceFile:172)
at com.jniwrapper.Library.load(SourceFile:128)
at AppletSample.init(AppletSample.java:47)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: C:\DOCUME1\Tomek\LOCALS1\Temp\sample.jar\jniwrap.dll (The process cannot access the file because it is being used by another process)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(Unknown Source)
at com.jniwrapper.DefaultLibraryLoader.a(SourceFile:341)
... 5 more
I get this error when executing my own applet as well as sample applets provided with the ComfyJ bundle.
I am sure that my environment is configured properly, it seems like attaching jniwrap.dll file in a .jar archive doesn't work.
Can You suggest me any other way to point the path to jniwrap.dll? There's one more thing: when running build.xml, there's a warning 'The signer certificate has expired' but I don't think this is the reason of JNIWrapperException.
I would appreciate any help,
Tomasz Modzrzejewski
Hi Tomasz,
In new version of JNIWrapper 3.6 (attached) we've made several fixes/improvements regarding loading native libraries from JAR files.
Please try this update and let us know if it helps to solve this problem.
-Serge
Serge,
Replacing JNIWrapper 3.5 with the new one works !
I really appreciate Your immediate answer,
Thanks,
Tomasz Modrzejewski