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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top