Topic: [求助]applet的环境变量配置问题 |
Print this page |
1.[求助]applet的环境变量配置问题 | Copy to clipboard |
Posted by: 梦里雪飘 Posted on: 2006-02-20 11:02 我是初学者,在eclipes里运行那些导入了applet的程序就正常,但是在dos下操作就出错,信息如下: Exception in thread "main" java.lang.NoSuchMethodError:main 请问这是环境变量配置的有问题吗? 我classpath是这样配的: D:\study\java\soft\jConnect-5_5\classes\jconn2.jar;C:\Program Files\Java\j2re1.4.2\javaws\javaws.jar;C:\Program Files\Java\j2re1.4.2\lib\rt.jar;C:\Program Files\Java\j2re1.4.2\lib;. 源程序如下: mport java.awt.*; import java.applet.Applet; public class BreakTest extends Applet{ public void paint( Graphics g ) { int count, xPos=25; for ( count=1;count<=10;count++){ if (count==5) break; g.drawString( Integer.toString( count ),xPos,25); xPos+=20; } g.drawString("Broke out of loop at count="+count,25,40); } } |
2.Re:[求助]applet的环境变量配置问题 [Re: 梦里雪飘] | Copy to clipboard |
Posted by: 梦里雪飘 Posted on: 2006-02-21 19:34 大家能帮我一下吗? |
3.Re:[求助]applet的环境变量配置问题 [Re: 梦里雪飘] | Copy to clipboard |
Posted by: eqq2002 Posted on: 2006-02-28 12:32 dos?Did you use command:appletviewer? |
4.Re:[求助]applet的环境变量配置问题 [Re: 梦里雪飘] | Copy to clipboard |
Posted by: liuzhenke15 Posted on: 2006-03-27 14:57 要运行applet应该用appletviewer命令,而非java命令,用java运行它加载的类必须定义了静态public main方法 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |