Before you close this for being a duplicate for one of the below posts, Java changed the requirements for runnable applets in Java 1.8. These requirements make it impossible to run an applet that is not signed by a trusted certificate. The only way to get around this is to add websites to an exception list, which isn't working for me either strangely.
Related, but out of date, posts:
- Java Error: "Your security settings have blocked a local application from running"
- "application blocked by security settings" prevent applets running using oracle SE 7 update 51 on firefox on Linux mint
- Run local java applet in browser (chrome/firefox) "Your security settings have blocked a local application from running"
Generating our jar file
Me and my 'company' have created a game that we want to put on our website. We converted the java app into an Applet. The applet runs in the appletViewer perfectly but it will not run in a webpage. Here is our manifest that we are using:
Manifest-Version: 1.0
Application-Name: Battle-Ship
Permissions: sandbox
Created-By: Chetter-Games
// empty line
Signing our jar file
The jar file is signed using a keystore that we have generated ourselfs (it is not from a trusted certificate distributor). Here is the output from jarsigner:
Enter Passphrase for keystore:
jar signed.
Warning:
No -tsa or -tsacert is provided and this jar is not timestamped. Without a
timestamp, users may not be able to validate this jar after the signer
certificate's expiration date (2015-12-09) or after any future revocation date.
I was pretty sure that this error is negligible. This might cause problems later, but we just want to get something up and running right now.
HTML page containing our Applet
Here is the html for our page with the embedded applet:
<html>
<body>
<applet code='battleShip.WindowApplet'
archive='signed-BattleShip.jar'
width=500
height=500>
</applet>
</body>
</html>
Here is a server-side ls of our working directory, which contains the applet page battle.html
and the applet signed-BattleShip.jar
:
-rw-rw-r-- 1 www-data www-data 12136 Dec 5 21:57 back.jpg
-rw-r--r-- 1 www-data www-data 195 Dec 9 14:25 battle.html
-rw-rw-r-- 1 www-data www-data 116 Dec 9 12:59 index.html
-rw-r--r-- 1 www-data www-data 27509 Dec 10 12:19 signed-BattleShip.jar
What are the problems?
No matter what we try, we always get this prompt:
So far we have tried all of the following:
- Restricting applet to sandbox
- Adding page to security exception list
- We have tried adding www.example.com, www.example.com/, and www.example.com/battle.html and none of those have helped
- Generating a new keystore
- Running it locally (did not help)
- Using Object tag instead of Applet
We think it has something to do with there no longer being a 'medium' option in the java control panel. We are just trying to get something up and running, any help would be very appreciated.