When I run the following command on my Mavericks Mac:
appletviewer index.html
The appletviewer process starts, but no window shows up with the actual applet, I need use kill -s 9
on the process to get the process to terminate.
I have installed and reinstalled java via Oracle's instructions (deleting the plugin and then reinstalling). Java applet permissions are set to medium.
Here is the output of java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
The java code and html file works fine on the remote linux machine:
<html>
<body>
<applet
code = "MyApplet.class"
width = 500
height = 400>
</applet>
</body>
</html>
Here's some sample java code that I could reproduce this error with
import java.applet.Applet;
import java.awt.Graphics;
public class MyApplet extends Applet {
public void paint(Graphics g) {
g.drawString("Hello world!", 50, 25);
}
}
Looks like it is related to this question, but those answers are also unsatisfying and don't help...
Unfortunately it seems from testing and forum trawling that the only real solution is to use Java 6.
Java 7's on Mac OSX seem to fundamentally break something that prevents the original Java 6 appletviewer from running properly.
An Apple Support page seems to imply that the bundled appletviewer is dependent on the JRE 6.