简体   繁体   English

在Eclipse中导出.jar Applet

[英]Exporting .jar Applet in Eclipse

I have an applet and I can't export it to a runnable jar because it doesn't have a main class( public static void main(String args[]) ) I need a runnable jar because I have a program that has many classes and packages. 我有一个小程序,我不能将它导出到一个可运行的jar,因为它没有主类(public static void main(String args []))我需要一个可运行的jar因为我有一个有很多类的程序和包裹。 How do I make this work. 我该如何做这项工作。 If the answer is adding a main method what do I put in the main method? 如果答案是添加一个main方法,我应该在main方法中添加什么?

Update I tried to use a normal .jar but still nothing. 更新我试图使用正常的.jar但仍然没有。 Here is a reply i sent to better describe what is happening 这是我发送的回复,以更好地描述正在发生的事情

"I still get the class not found error. I have a .jar that has a "main" folder. Then in the "main" folder I have all my classes. My main class is Render.class so in html i use this code to open the applet: " “我仍然得到类找不到错误。我有一个.jar有一个”main“文件夹。然后在”main“文件夹中我有我所有的类。我的主类是Render.class所以在html我使用这个代码打开小程序:“

If it's an applet it isn't a 'runnable jar'. 如果它是一个applet,它不是一个'runnable jar'。 Luckily, you don't need one. 幸运的是,你不需要一个。 You just need an ordinary jar. 你只需要一个普通的罐子。 Eclipse will make one of those. Eclipse将制作其中之一。

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

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