• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

signed applet issue

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I need to copy dlls from server to client and execute it in client machine.

For this, I have used signed applet and JNI.

Everything works fine. On click of my jsp button; it calls applet ; the applet copies the dll in client machine and executes it.

One problem thats really eating my head now. If I click on the button again it throws Exception.

The reason : its unable to copy the second time. My browser and JRE have somehow locked the dll.
Something like.. trying to delete an already opened file.

Any idea how to overcome this? Any javascript or something to kill the JRE instance? or may be free or unload dll. How do i achieve this?

I also tried to do a check before downloading. i.e if file exists. SOme how thats also not working.
 
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Whats the exception stack trace?
 
Aparna Sree
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

java.io.FileNotFoundException: "path" ... cannot access the file because it is being used by another process.

The dll is in use. If I try to delete the folder, it wont allow.

But, if I close the browser and then click the button , it works fine.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is not possible to replace a DLL that's used by a JVM without shutting down the JVM. And -for obvious reasons, really- a web app can't shut down the client-side JVM. You'll need to come up with some other approach, or ask the user to restart the browser.
 
Honk if you love justice! And honk twice for tiny ads!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic