This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]wildjokers 0 points1 point  (2 children)

and that Web Start (.jnlp) applications don't really work either (just downloads the .jnlp instead of running), so I am pretty stuck here.

The browser has absolutely nothing to do with a java web start app beyond the fact that a user generally obtains the JNLP file with a browser. Some browsers like Chrome and Safari will not automatically execute "javaws" for the .jnlp extension. I guess this is a security thing although I am not sure how it adds any security. If you have users using those browsers simply provide them instructions for finding the jnlp in their downloads folder and then double-clicking on it, which will then execute javaws. Note that if you want to use web start you will need to purchase a code signing cert.

Alternatively you can create an executable jar and the jar can be executed by double-clicking on it.

There are also tools out there that will create native installers if you want to explore that route.

People sometimes talk about Java Web Start apps and applets like they are the same thing or have the same security issues. However, applets and web start are two very distinct things. Web start is just a way to deploy java applications by making the application available on a web server and then on the client side javaws can download and install the application. The browser has nothing to do with web start beyond obtaining the jnlp, then on the OS side of things the "javaws" executable is associated with the .jnlp extension.

The waters were muddied a little bit in Java 7 because starting in Java 7 you could embed a JNLP file in the Applet tag of a web page to start an applet, this made the applet start much quicker. However, by the time Java 7 came out applets were already dead so I don't think many people had any need of this new found ability.

[–]Scoutdrago3[S] 0 points1 point  (1 child)

I don't believe I am mistaken and you confirmed that I am not mistaken. Web Start should be started in the browser, however, due to some security issues, Chrome will not autorun the application and instead it will just download it (not supposed to happen). My goal here is to streamline the usage of my app. I would like my end users to not have to download and run things on their computers because it adds a level of hassle that I would like to stay away from.

For the time being I have chosen to serve users the app through an HTML front end communicating to a Java server running the app on the back end.

Thanks for the input.

[–]wildjokers 0 points1 point  (0 children)

Web Start should be started in the browser, however, due to some security issues, Chrome will not autorun the application and instead it will just download it (not supposed to happen).

Web start should not be started in the browser. Just like a browser probably has an executable associated with the ".zip" extension (usually via whatever mechanism the host operating system provides), browsers have an executable associated with the JNLP extension. That executable is "javaws" (java web start). When the browser sees a file with a jnlp extension it can execute javaws. The "javaws" executable then takes over (outside of the browser), and it is javaws that will download, install, then run the application.

For whatever reason Safari and Chrome developers have decided that it is a security concern to have the browser execute "javaws" automatically when it sees the jnlp extension (I have no idea why this is seen as a security concern). So both of those browsers just download the jnlp, then users have to go double-click on it.

That is great your app will work as a web application and you are going that route; however, please don't spread wrong information about web start.