Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to use Java webstart execute .exe or dll?

I know java webstart is running under a secure sandbox. Is it possible to include a .dll/.exe in the jar (or have the webstart download it to the local machine) and then execute it (using Runtime.exec or process,etc)

Please Advise. Any suggestion/comment is welcome!

like image 637
Roy Chan Avatar asked May 06 '09 18:05

Roy Chan


People also ask

What does Java Web Start do?

The Java Web Start software allows you to download and run Java applications from the web. The Java Web Start software: Provides an easy, one-click activation of applications. Guarantees that you are always running the latest version of the application.

Is Java Web Start still used?

In computing, Java Web Start (also known as JavaWS, javaws or JAWS) is a deprecated framework developed by Sun Microsystems (now Oracle) that allows users to start application software for the Java Platform directly from the Internet using a web browser.

What is the alternative to Java Web Start?

Setlog just released its first open-source project. It is a combined installer, updater and launcher named trivrost, which, among other things, can act a Java Web Start alternative.


1 Answers

Yes. You have to wrap the .dll in a .jar file, and reference it in your .jnlp file using <nativelib>

See here for a more detailed description.

If you want to run an executable, then your best bet is to package it up in your .jar as a resource, explode it to (say) a temporary directory, and then run it using the normal Process/Runtime mechanism.

like image 158
Brian Agnew Avatar answered Sep 21 '22 19:09

Brian Agnew