Java Applet in Browser

0

I have an applet that I want to run in my ASP.NET application, I was looking for how to load it and I found a method that works for me, I run it from jscript with:

<script src="http://www.java.com/js/deployJava.js" type="text/javascript"></script>
<script type="text/javascript">
    var attributes = {
        code: 'Applet.class',
        archive: 'Applets/miapplet.jar', 
        width: 325, height: 325 
    };
    var parameters = { fontSize: 16 };
    var version = '1.6';
    deployJava.runApplet(attributes, parameters, version); 
</script> 

He already sends me to call the applet, but he gives me the following error:

SecurityException
attempted to open sandboxed jar miapplet.jar as a Trusted-Library

I have read that maybe it is something from the signature of the jar, I use the option "self-sign by generated key" (since I do not know another method and that is by default). I have also read that it is enough to remove the Trusted = true option but it does not work for me. Any ideas that could help me?

P.D I use the latest version of java, I run the application with NetBeans and it works perfectly, and I visualize my website from internet explorer, since in Chrome it tells me that it does not support java.

    
asked by EriK 02.01.2018 в 19:33
source

1 answer

0

The Famous Applets of yesteryear, the problem: After version 7 of Java (Java 7 Update 51) browsers do not allow your application to run if it is not signed by "a trusted authority". You must also edit the MANIFEST of your application with certain features, so you can run.

You can try getting a test key for 2 months, that's what I did to develop my application in tests, sign the jar with the certificate, lower the security of the java console.

And try to run it in IE or Firefox, Chrome no longer accepts applets because of its low security.

More info: Why in the latest Java version my security settings block Java applications ?

    
answered by 06.01.2018 в 01:46