Cannot launch applet using Java 7u21

為{幸葍}努か 提交于 2019-11-29 14:08:25

Here is the page that explains it.

Oracle Code on Mixed code

What you need to do is take all of your jars are get the new TrustedLibrary line in the manifest file. For me that meant a recompile of older code. You could probably just unjar the current jars and then rejar including the TrustedLibrary line.

You also MUST sign all of your code. Not just the applet. That means if you have 3 jars then all the code in all 3 jars must be signed also.

My colleague cracked it. Giving vodka to a Polish guy can sometimes produce the needed inspiration. :-)

Anyway, it seems like the security tag is now required in the jnlp information sent to the applet (what is being returned with content type set to application/x-java-jnlp-file).

By adding

<security> 
    <all-permissions/>
</security>

it works.

Hope this helps.

The following quote from the Security page of the Java SE documentation is pertinent:

"The standard java policy files can be used to enhance the permissions granted to untrusted apps. In addition to $JRE_HOME/lib/security/java.policy and $USER_HOME/.java.policy (used by all java programs), applications and applets loaded by Java Web Start and Java Plug-in load two additional policy files, whose location can be configured by the deployment configuration properties: deployment.user.security.policy and deployment.system.security.policy."

Check the policy files in those locations.

An additional hint to all developers using unsigned applets. Last week at the JAX2013 conference, Wolfgang Weigand from Oracle mentioned that after the October 2013 Java 7 Release there will be only the highest level of the applet security slider, i.e. only applets signed with a trusted (not selfsigned) certificate will be able to run. Up to now, this information has not been published yet on the official Oracle web site.

The answer above quoting from the JAVA6 Security page may be a bit outdated due to the latest security changes in Java Platform

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!