I tried the thing with the .jar-file but now the console says:
Load: Class game.jar not found
java.lang.ClassNotFoundException: game.jar
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassNotFoundException: game.jar
The html file looks like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html>
<head> <title>Groundhog</title> </head>
<body>
<p> <applet code="game.jar" height="470" width="800"> </applet> </p>
</body> </html> |
The html file is in the same folder as the .jar file.
Also tried to change the path to "battlemode/Battleview.class". Same error.
Although I haven't located the html file in the /bin folder yet.
Will try that.
Edit 1:Alright now I don't get the error message anymore (html files path is "battlemode/Battleview.class" - the file itself lies in the /bin folder). But: Now there is simply nothing on the screen/in the applet.
Just wonderful empty whiteness. (
looks like this)
Edit 2:Got that out of the Java Console
java.security.AccessControlException: access denied (java.io.FilePermission images\grasland_bkg.jpg read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.File.canRead(Unknown Source)
at javax.imageio.ImageIO.read(Unknown Source)
at battlemode.Battleview.loadPictures(Battleview.java:117)
at battlemode.Battleview.init(Battleview.java:92)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Ausnahme: java.security.AccessControlException: access denied (java.io.FilePermission images\grasland_bkg.jpg read)
Well, obviously we have some access permission problem here

Note: I still have that html file on my harddrive. Nothing online.