“Your security settings have blocked a local application from running” Java 8
Medium was removed in Java 8u20:
Medium (removed from Java 8 Update 20 and later versions)
Only unsigned applications that request all permissions are blocked. All other applications are allowed to run with security prompts. Selecting the Medium security level is not recommended and will make your computer more vulnerable should you run a malicious application.
Keep in mind, this only applies to unsigned applets that request all permissions.
What to do
To run these applets, you now must add the site to the exception list under the Security tab when you access your Java settings from the Control Panel.
If the applet is not on a website, you must use the applet viewer, which allows you to run applets outside of a browser
*What* Java security settings have blocked a local application from running?
I just tried your code using Java version 1.7.0_25-b17. It works just fine in the browser on the two lower settings seen here.
To get it to work for the highest security level, it needs to be put in a Jar and signed using a valid certificate.
Security settings have blocked a self-signed application from running as developer
You need to buy a real certificate and sign it with that. Otherwise it would require users to trust your certificate, which is not secure at all (you're not a trustworthy entity).
Related Topics
Nullpointerexception Through Auto-Boxing-Behavior of Java Ternary Operator
Hexadecimal to Integer in Java
Singleton Design Pattern: Pitfalls
Selenium Webdriver + Java - Eclipse: Java.Lang.Noclassdeffounderror
How to Use Java to Read from a File That Is Actively Being Written To
Class Not Found with Ant, Ivy and Junit - Error in Build.Xml
Tomcat 8 Is Not Able to Handle Get Request with '|' in Query Parameters
Jdbc Connection to Mssql Server in Windows Authentication Mode
How to Avoid a Lot of If Else Conditions
Java - How to Drag and Drop JPAnel with Its Components
Getting the Inputstream from a Classpath Resource (Xml File)
Java Reflection: How to Get the All Getter Methods of a Java Class and Invoke Them
How to Avoid 'Instanceof' When Implementing Factory Design Pattern
Sorting a List with Stream.Sorted() in Java