Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Web start application freezes when launched from web

936814Oct 25 2012 — edited Nov 26 2012
Hi All,
I'm trying to run a java application, that uses javafx, as web start.
My problem is that this application runs fine if I launch the jnlp locally from my
pc but when I launch the jnlp from web the application runs slowly till freezing.
I've tried with different pc (win xp, win 7 and mac osx), different browsers (Firefox, Chrome, IE)
and different web servers but the problem is the same in all cases.
All jars are signed with a self-signed certificate and in all machines is installed Java SE 7u9.

Enabling Java Console I've noticed a lot of log like:

basic: JNLP2ClassLoader.findClass: java.lang.ImageView: try again ..
basic: JNLP2ClassLoader.findClass: java.lang.ImageView: try again ..
basic: JNLP2ClassLoader.findClass: java.lang.Image: try again ..
basic: JNLP2ClassLoader.findClass: java.lang.Image: try again ..
network: Cache entry not found [url: http://www.mysite.com/applet/META-INF/services/javax.xml.stream.XMLInputFactory, version: null]
network: Connecting http://www.mysite.com/applet/META-INF/services/javax.xml.stream.XMLInputFactory with proxy=DIRECT
network: Connecting http://www.mysite.com:80/ with proxy=DIRECT
network: Connecting http://www.mysite.com/applet/META-INF/services/javax.xml.stream.XMLInputFactory with cookie "has_js=1"
basic: JNLP2ClassLoader.findClass: java.lang.Font: try again ..
basic: JNLP2ClassLoader.findClass: java.lang.Font: try again ..
basic: JNLP2ClassLoader.findClass: javafx.scene.control.Font: try again ..
basic: JNLP2ClassLoader.findClass: javafx.scene.control.Font: try again ..
basic: JNLP2ClassLoader.findClass: javafx.scene.layout.Font: try again ..
basic: JNLP2ClassLoader.findClass: javafx.scene.layout.Font: try again ..
network: Cache entry not found [url: http://www.mysite.com/applet/META-INF/services/javax.xml.stream.XMLInputFactory, version: null]
network: Connecting http://www.mysite.com/applet/META-INF/services/javax.xml.stream.XMLInputFactory with proxy=DIRECT
network: Connecting http://www.mysite.com:80/ with proxy=DIRECT
network: Connecting http://www.mysite.com/applet/META-INF/services/javax.xml.stream.XMLInputFactory with cookie "has_js=1"

What am I doing wrong?

This is my jnlp (MyApp.jnlp)

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec = "1.0" xmlns:jfx = "http://javafx.com" codebase = "http://www.mysite.com/applet/" href = "MyApp.jnlp">
<information>
<title>MyApp</title>
<vendor>MyApp</vendor>
<description>My application.</description>
<homepage href = "http://www.mysite.com/applet/"/>
<offline-allowed/>
</information>
<resources>
<jfx:javafx-runtime version = "2.2+" href = "http://javadl.sun.com/webapps/download/GetFile/javafx-latest/windows-i586/javafx2.jnlp"/>
</resources>
<resources>
<j2se version = "1.6+" href = "http://java.sun.com/products/autodl/j2se"/>
<jar href = "MyApp.jar" size = "2836601" download = "eager"/>
<jar href = "libs/gson-2.2.2.jar" size = "189285" download = "eager"/>
<jar href = "libs/sun.jar" size = "83743" download = "eager"/>
</resources>
<applet-desc width = "1280" height = "1024" main-class = "com.javafx.main.NoJavaFXFallback" name = "MyApp">
<param name = "requiredFXVersion" value = "2.2+"/>
</applet-desc>
<jfx:javafx-desc width = "1280" height = "1024" main-class = "test.App" name = "MyApp"/>
<update check = "background"/>
</jnlp>

and this my html page

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>My App</title>
<script src="http://java.com/js/dtjava.js"></script>
<script>
function launchApplication(jnlpfile) {
dtjava.launch( {
url : 'MyApp.jnlp'
},
{
javafx : '2.2+'
},
{}
);
return false;
}
</script>

<script>
function javafxEmbed_fxApplication() {
dtjava.embed(
{
id : 'fxApplication',
url : 'MyApp.jnlp',
placeholder : 'MyAppId',
width : 1280,
height : 1024
},
{
javafx : '2.2+'
},
{}
);
}
<!-- Embed FX application into web page once page is loaded -->
dtjava.addOnloadCallback(javafxEmbed_fxApplication);
</script>

</head>
<body>


</body>
</html>

Thank you
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 24 2012
Added on Oct 25 2012
5 comments
2,192 views