Main方法未找到错误在applet [英] Main method not found error in an applet

查看:233
本文介绍了Main方法未找到错误在applet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的学校,我用记事本++写一个小程序,我需要在一个罐子来包装它,所以我可以签字。我试图用这样一个批处理文件来做到这一点:

At my school I am using Notepad++ to write an applet, and I need to package it in a jar so I can sign it. I am attempting to do this with a batch file like this:

CD C:\Users\name\Java\bin
javac className.java
jar cvfm className.jar Manifest.txt classFolder
java -jar className.jar
PAUSE

然后我得到没有发现异常的主要方法。没有多少,我可以调试,或打开了我的罐子方面做,因为正如我以前说过,这是在学校和这么多的功能被阻断。如果需要,我可以提供更多的细节,谢谢。

And then I get a main method not found exception. There is not much I can do in terms of debugging, or opening up my jar, because as I said before, it is at school and so much of the functionality is blocked. I can provide more details if needed, thanks.

推荐答案

小程序没有方法,所以你不能与常规方式运行的Java 命令。

Applets don't have a main method, so you cannot run it in the conventional way with the java command.

要运行小程序,创建一个有小程序的HTML文件,然后运行的appletviewer 或查看页面在Web浏览器。

To run the applet, create an HTML file with the applet in it, and run appletviewer or view the page in a web browser.

这篇关于Main方法未找到错误在applet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆