简体   繁体   English

Eclipse制作的.jar文件无法运行

[英].jar File made from Eclipse won't run

I have a single class for an Applet I made, and I have been trying to make it into a .jar file. 我为Applet创建了一个类,并且一直在尝试将其制作为.jar文件。 In Eclipse, I right click on the folder -> Export -> Java-> Jar File->Finish. 在Eclipse中,我右键单击文件夹->导出-> Java-> Jar File->完成。 When it finishes, it says "Exported with compile warnings: FirstApplet/src/ScoreCountingApplet.java". 完成时,它会显示“已导出编译警告:FirstApplet / src / ScoreCountingApplet.java”。 When I click it, it won't do anything, and it is completely unresponsive. 当我单击它时,它不会执行任何操作,并且完全没有响应。 I even checked the MF file and made sure that I added in the "Main-Class: ScoreCountingApplet" line to the Manifest. 我什至检查了MF文件,并确保将“ Main-Class:ScoreCountingApplet”行添加到清单中。 I have no idea how to make it work. 我不知道如何使它工作。 Any feedback would be greatly appreciated. 任何反馈将不胜感激。 Thanks! 谢谢!

**Note: Also, if I try to compile with "javac" in the Command Prompt, it says something to the effect of "javac is not recognized as an internal or external command, operable program, or batch file. **注意:另外,如果我尝试在命令提示符中使用“ javac”进行编译,则它表示“ javac无法识别为内部或外部命令,可操作程序或批处理文件”。

Applets use to run a HTML file, on a browser or Appletviewer tool. 小程序用于在浏览器或Appletviewer工具上运行HTML文件。

Also you have the option or kind of trick to embed a Panel/Applet into a Frame/JFrame, 您也可以选择将面板/小程序嵌入到Frame / JFrame中,

If the second one is not your case I am not sure if there is a way that your Applet/Jar is going to run. 如果第二个不是您的情况,那么我不确定您的Applet / Jar是否有运行的方法。

尝试使用“导出为可运行的Jar”。

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

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