I'm going to migrate a Java Applet to be started via JNLP as a Java Web Start Application and run into some troubles/missunderstandings ...
One of the resources I've got is this: 6 Migrating Java Applets to Java Web Start and JNLP:
But let's start:
Currently the application is an applet (JApplet) and was started in past by embedding into an HTML with the applet tag referring to a JNLP.
Now since applet support was dropped by all browsers, I should run it as Java Web Start.
Simply calling same JNLP failed as the resources (JAR files) couldn't be loaded.
This was as a first step fixed by adding an code base attribute to the JNLP file.
Applet is starting outside of the browser.
But now the hard part ... I should/would like to get rid of any applet dependency.
But how?
What is the right approach for that?
The guide doesn't really tell, and therefore I have some questions:
- e.g.: How do I replace the usage of the
applet.getAppletContext()and related usage of it? - The guide says I should place a static main in my "main" applet class. But How should I do this?
I tried & to start the applet in different ways, but after that my applet was not starting any more.
How do I really replace it?
What should be the right wrapper for an application instead of applet?
How to start it?
Is there maybe a more elaborate guide/sample/tutorial to follow with a real example?
JPanelthat can be placed in either aJAppletor aJFrame. Search the posts of trashgod or myself for 'hybrid'. Those answers discuss (& often show) how to make an app. that can work as either an applet or an application. If you want to go a step further and remove applet support completely, it should be easy once there is a working hybrid applet/application.