I'm trying to explore URL data capabilities to embed in HTML Java applet.
The documentation, for HTML tags to instantiation a java applet 1, don't exclude this option but I don't seem to be able to to this.
I have different variations of HTML tags values using (object and applet) and what I think came close to my goal was this:
<object type="application/x-java-applet" width="100" height="100">
<param name="archive" value="data:application/java-archive;base64,BASE64_OF_JAR"/>
<param name="code" value="test.class"/>
<h1>not working</h1>
</object>
This variation result in an IlegalArgumentException with text "name". I check this clicking on the Error Icon on the Browser. On The java console the whole stack trace is:
java.net.MalformedURLException: unknown protocol: data
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at sun.plugin.util.ProgressMonitorAdapter.setProgressFilter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.setupProgress(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Does anyone have an idea about how to do this or if it's not possible?
PS: There's an example of how to embed an JNLP in HTML by Oracle here
data:application/java-archive
withdata:application/x-java-archive
? – Intrench