Question

We are deploying a Swing-based application (with some JavaFX components) via Webstart using the latest Java 7 version (U7):

<script src="http://java.com/js/dtjava.js"></script>
<script>
        function launchApplication(jnlpfile) {
        dtjava.launch(
            { url : jnlpfile },
            {
                javafx : '2.2+',
                toolkit: 'swing'
            },
            {}
        );
        return false;
    }
</script>
...
<p>
<a href='xxxx.jnlp' 
    onclick="return launchApplication('xxxx.jnlp');">Start</a> 
<noscript>
<p style="color: red">Please enable JavaScript!</p>
</noscript>
</p>

Unfortunately the dialog showing the progress for downloading the JAR file(s) and verifying them is not shown. Which means that when it is required to download files from the server the user will think that starting the application didn't work because he receives no feedback.

Any ideas why this dialog is not shown? Has this something to to with Java 7 or with using the deployment toolkit?

Was it helpful?

Solution

Swing applications with embedded JavaFX don't have a default preloader. According to the JavaFX deployment doc, it is the preloader which displays the loading progress bar while jars are being fetched.

I don't know if it is possible to create a custom preloader for a Swing app, you could try it and see if it works - however I suspect that it may not be possible.

If creating a default preloader does not work, then you can log an issue against the JavaFX project. If the issue should be resolved by the main Java project, the JavaFX team will triage it and let you know.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top