简体   繁体   English

是否可以为Java Applet制作JAR文件?

[英]Is it possible to make a JAR file for a Java Applet?

Is it possible to make a JAR file for a Java Applet? 是否可以为Java Applet制作JAR文件? And no, I don't have a JApplet, I have an Applet. 不,我没有JApplet,我有Applet。 My class extends Applet instead of JApplet. 我的课程扩展了Applet而不是JApplet。

Yes . 是的 See Deploying An Applet In Under 10 Minutes : 请参阅在10分钟内部署Applet

  • Compile / build your applet's Java code and make sure all class files and resources such as images etc. are in a separate directory, example build/components. 编译/构建applet的Java代码,并确保所有类文件和资源(例如图像等)都位于单独的目录(例如build / components)中。
  • Create a jar file containing your applet's class files and resources. 创建一个包含applet的类文件和资源的jar文件。
  • Sign your jar file if the applet needs special security permissions, for example, to be launched in a modern JRE with default settings. 如果小程序需要特殊的安全权限,请签名您的jar文件,例如,要在具有默认设置的现代JRE中启动该小程序。 By default, unsigned code will be blocked. 默认情况下,未签名的代码将被阻止。
  • Create a JNLP file that describes how your applet should be launched. 创建一个描述如何启动小程序的JNLP文件。

See also Deployment Toolkit 101 - Java Tutorials Blog 另请参见部署工具包101-Java教程博客

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM