Java Plugin vs Web Start

Upload core product.
Post Reply
User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Java Plugin vs Web Start

Post by support »

Oracle has announced the end of Java Plugin for Java 9 planned by the end of 2016.
https://blogs.oracle.com/java-platform- ... lugin_free

It means that applets won't be supported in any browser for Java 9 (and higher) because applets rely on Java Plugin. However, it will continue to be supported for Java 8 only until EOL (in 2017 or 2018).

Does it mean Java is dead? No, only Java Plugin will die but we still have Java Web Start as alternative to run/deploy Java applications automatically from any browser.

JFileUpload supports Java Web Start deployment since a few years. A working sample is already available in documentation/samples/webstart folder. We're going to add more samples in our online demos.

But what should we know for a Java Plugin (Applet) vs WebStart deployment:
- Both require Java installed on client-side (desktop/laptop)
- Both run in secured sandbox (need signed code to access local resources)
- Applet is displayed inside browser, WebStart not (in external window)
- WebStart application is launched from browser with a link (.jnlp) in HTML page
- WebStart does not require any JavaScript or Applet tag in browser
- Parameters for WebStart application are setup within the .jlnp file
- File(s) Drag&Drop, copy/paste works with WebStart application
- Redirect with URL in browser after upload basically works
- JSAPI cannot work as WebStart runs outside browser
webstartlink.png
WebStart launch example
(17.73 KiB) Not downloaded yet

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Java Plugin vs Web Start

Post by support »

Here is a sample of JNLP file. Notice the parameter width/height to setup WebStart window size. Modified resources are under a i18n_test.properties. If you pass variables in post parameter, they must be URL encoded.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8080/upload/" href="webstart_http.jnlp">
  <information>
    <title>JFileUpload</title>
    <vendor>JFileUpload.com</vendor>
    <homepage href="http://www.jfileupload.com"/>
    <description>Java File Uploader</description>    
    <offline-allowed/>
  </information>
  <security>
        <all-permissions/>
  </security>
  <resources>
    <j2se version="1.4 1.5 1.6 1.7 1.8 1.9"/>
    <jar href="lib/jfileupload.jar" main="true" download="eager"/>
    <jar href="lib/chttpclient.jar"/>
    <jar href="lib/httpimpl.jar"/>
    <jar href="lib/clogging.jar"/>
  </resources>

  <application-desc main-class="jfileupload.upload.client.MApplication">  
    <argument>-width</argument>
    <argument>400</argument>
    <argument>-height</argument>
    <argument>350</argument>
    <argument>-url</argument>
    <argument>http://localhost:8080/upload/process.jsp</argument>
    <argument>-mode</argument>
    <argument>http</argument>
    <argument>-paramfile</argument>
    <argument>uploadfile</argument>
    <argument>-folderdepth</argument>
    <argument>1000</argument>
    <argument>-param1</argument>
    <argument>todo</argument>
    <argument>-value1</argument>
    <argument>upload</argument>
    <argument>-param2</argument>
    <argument>relativefilename</argument>
    <argument>-value2</argument>
    <argument>true</argument>	
    <argument>-post</argument>
    <argument>http://localhost:8080/upload/process.jsp?test1=value1&test2=value2</argument>	
    <argument>-postparameters</argument>
    <argument>true</argument>	
    <argument>-resources</argument>
    <argument>http://localhost:8080/upload/i18n_test</argument>
  </application-desc>
</jnlp>

Post Reply