views:

53

answers:

1

I have a single .jar file that I create by using the runnable .jar file export function in Eclipse. This file runs flawlessly when you just download it and run it. Now I'm trying to embed it in an HTML file, but having trouble.

Here is the standalone jar

Here is the page where I attempt to embed the .jar file. I could not make it run on it's own, but If I took the Main.class file from the bin/ directory of my Project and included that too, it almost works.

<html>
<head><title>Voronoi Cells</title></head>
<body>
<applet code="Main.class" archive="Voronoi_Standalone_Local.jar" width="600" Height="500">
</applet>
</body>
</html>

Here is that page online

With this arrangement, in Chrome, the applet shows, but the framerate is only around 1 fps.

It crashes Firefox.

It works fine it Safari!

Who cares what it does in IE.

What is the correct applet tag I should use? I would prefer to reference only the single standalone .jar file if possible. Why is the framerate so bad in Chrome?

+1  A: 

Nice one there.

I would suggest adding a frame number counter and displaying it overlaid on the frame.

My guess is that you will find that the update frequency putting the Java frame data inside the page is too low, so you have plenty of updates, but they don't make it to the page.

I would suggest opening a new JFrame and display in that to see if that helps. If yes, then this is a plugin issue to the "hole" in the browser page.

Thorbjørn Ravn Andersen
What did you find?
Thorbjørn Ravn Andersen