I have a very simple Test program that just opens up a JFrame and I want to open it in browser. I know I have to self sign it to open it but it throws just this error:
java.lang.reflect.InvocationTargetException
I have signed the jar with the JARMAKER
My HTML to load the jar:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
</head>
<body>
<p>Inhalt der Webseite</p>
<applet code=Simple_Frame.class
archive="Simple_Frame2.jar"
width="120" height="120">
</applet>
</body>
</html>
The simple Test program:
import java.applet.Applet;
import java.awt.*;
/**
* Created by Flex on 22.10.14.
*/
public class Start extends Applet{
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
Simple_Frame ex = new Simple_Frame();
ex.setVisible(true);
}
});
}
}
import javax.swing.JFrame;
public class Simple_Frame extends JFrame {
public Simple_Frame() {
setTitle("Simple example");
setSize(300, 200);
setLocationRelativeTo(null);
setDefaultCloseOperation(EXIT_ON_CLOSE);
}
}
How can I open a Jar in a webpage on my localhost to test it without that error and what does this error mean?