My JavaFX app is working when executed via the JavaFX Eclipse plugin.
But when I try to embed it into my web project, it is not being rendered properly and after a while a black rectangle is loaded in it's place.
Here is the code for loading my JavaFX Application:
<script src="http://dl.javafx.com/1.2/dtfx.js"></script>
<script>
javafx({
codebase: "/applets/",
archive: "HelloApplet.jar",
draggable: false,
width: 250,
height: 80,
code: "hello.HelloApplet",
name: "HelloApplet"
});
</script>
And here is the code for my JavaFX App:
package hello;
// some imports here
// ...
Stage {
title: "My Applet"
width: 250
height: 80
scene: Scene {
content: Text {
x: 10 y: 30
font: Font { size: 24 }
fill: Color.BLUE
effect: DropShadow{ offsetX: 3 offsetY: 3}
content: "Hello World!"
} // Text
} // Scene
} // Stage
In my web project i have placed the generated HelloApplet.jar into:
src/main/webapp/applets/HelloApplet.jar
but to no avail it is still not loading what am i doing wrong here? am i missing something?
Is it possible to enable any logging while loading the applet?