Search code examples
javaoracleinternet-explorerappletmicrosoft-edge

JavaApplet under Java 11+ / Edge (without Oracle)


Have to get some very old legacy Applet Running. The Applet original used JDK 1.4 and IE. The new system is Edge and OpenJDK 11 or higher. In the old System, we used Oracle JDK 8 which implements an IE Plugin (Java Plug-in 11.321.2). On the Webpage (BlackBox) is a Link to start the "App". The Task Manager shows p2launcher.exe (Java(TM) Web Launcher). I don't really know how to get rid of Oracle here.

By now I thought about OpenWebStart but there is no JNLP File. Or to build some Wrapper to load the Applet, but that's not so easy because the applet somehow interacts with the document from the webpage.

So is there someone with a good idea to get an old JavaApplet to run on Edge / Java 11+?


Solution

    1. Write a jnlp File
    2. Install Azul IcedTeaWeb
    3. Configure the deployment jre

    1.This is heavily based on the applet to be replaced. Here is an example:

    
        <jnlp spec="1.5+" xmlns="http://www.w3.org/1999/xhtml" codebase="*applet origin*" href="file:///C:/Program Files/JNLP/myJnlpFile.jnlp">
          <information>
            <title>Some title</title>
            <vendor>some vendor</vendor>
            <description>some Description</description>
            <homepage href="http://*applet url*"></homepage>
            <offline-allowed/>
          </information>
          <security>
            <all-permissions/>
          </security>
          <resources>
            <j2se version="1.3+"></j2se>
                <jar href="http://*applet URL*/some.jar" download="eager" main="true"></jar> <!-- this can be found in the original applet / page code -->
                <jar href="http://*applet URL*/another.jar" download="eager"></jar>
          </resources>
          <applet-desc 
            name="Some name" 
            main-class="myAppletMainClass" 
            width="1000" 
            height="800"
            align="baseline">
                    <!-- this is based on the Applets params, simply some name and value pairs -->
                    <param name="code" value="myAppletMainClass">
                    <param name="archive" value="http://*applet URL*/some.jar"> 
          </applet-desc>
        </jnlp>
    
    
    1. Download and install (nothing changed during installation): Azul IcedTeaWeb Download
    2. cmd "C:\Program Files\IcedTeaWeb\WebStart\bin\itweb-settings.exe" -headless set deployment.jre.dir "C:\Program Files\Java\zulu8" (yes thats not Java 11 like I mentioned in the question, but is still supported by Azul until 2030 and it is only used for this application and not the whole system)

    Thats how it worked for me.