Can i use java webstart execute.exe or dll?

I know java webstart runs under a secure sandbox. Is it possible to include a .dll / .exe file in a jar (or upload a website to a local computer) and then execute it (using Runtime.exec or a process, etc.).

Advise. Any suggestion / comment is welcome!

+4
source share
2 answers

Yes. You must wrap the .dll in the .jar file and reference it in the .jnlp file using <nativelib>

See here for more details.

If you want to run the executable, it is best to pack it into your .jar as a resource, explode it (say) with a temporary directory, and then run it using the usual Process / Runtime mechanism.

+6
source

Yes, if the user grants your application rights (via a popup dialog), the Java website will have access to the file system and will have permission to use Runtime.exec.

+1
source

All Articles