This Question is Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
2 Replies Last post: Jan 16, 2007 11:12 PM by Tomasz Modrzejewski  
Tomasz Modrzejewski   5 posts since
Jan 15, 2007
Currently Being Moderated

Jan 16, 2007 10:14 AM

Running an applet with embeeded OCX

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

Serge Piletsky TeamDev Ltd. 670 posts since
Apr 24, 2006
Currently Being Moderated
1. Jan 16, 2007 1:55 PM in response to: Tomasz Modrzejewski
Re: Running an applet with embeeded OCX

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

Attachments:

More Like This

  • Retrieving data ...