Generated JNLP and HTML files - mysterious values

Scott Kovatch scott.kovatch at oracle.com
Fri Nov 16 08:58:45 PST 2012


On Nov 16, 2012, at 2:15 AM, Daniel Zwolenski <zonski at gmail.com> wrote:

> When the standard JFX packaging tool generates a JNLP file it includes:
> 
>    <jfx:javafx-runtime version="2.2+" href="
> http://javadl.sun.com/webapps/download/GetFile/javafx-latest/windows-i586/javafx2.jnlp
> "/>
> 
> I don't understand why there is a windows specific URL in the JNLP file -
> isn't a JNLP file OS independent?

Not necessarily. You can put platform-specific resources in a JNLP based on the OS or architecture for things like native libraries that only apply to a given platform.

In this case, that URL is there to install the Windows implementation of JavaFX if it isn't available. It's only very recently that JavaFX is being included with the JRE. Each platform has its own implementation of Glass, so we have to install the right one.

> Also, the generated HTML file to launch the JNLP has this:
> 
>        dtjava.launch(            {
>                url : 'hello-javafx-maven-example-1.0-SNAPSHOT.jnlp',
>                jnlp_content :
> 'PD94bWwgdmVyc2lvbj0iMS4wIi...whole-lot-more-base64-style-data ....
> 
> What's the 'jnlp_content' thing for? From the code it looks like a base64
> encoding of the JNLP file.

Yes, that's basically what it is. This allows us to pass in the JNLP directly to Web Start without the overhead of another HTTP request. This is a feature of DeployToolkit, and it's documented in the main deployment guide. See section 7.3.2 and 7.3.3.

<http://docs.oracle.com/javafx/2/deployment/deployment_toolkit.htm>

-- Scott K.

------------------------
Scott Kovatch
Oracle
Pleasanton, CA




More information about the openjfx-dev mailing list