为什么在eclipse中能够运行的applet程序换成html在命令行就不能了,该怎么解决

为什么在eclipse中能够运行的applet程序换成html在命令行就不能了
Html文件代码: (文件名为Appcounter.html)
<applet code=ButtonExample.class width=300 height=200>
</applet>
将该文件与ButtonExample.class保存在同一个目录中,使用appletviewer Appcounter.html命令就可以运行这个applet。
我已经按照上面的代码操作了,就是不能正常在命令窗口中运行。
package ExpCode;

import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.ImageIcon;
import javax.swing.JApplet;
import javax.swing.JButton;

public class ButtonExample extends JApplet {
int imageNum = 1;

public void init() {
Container con = getContentPane();
final JButton jb_ok = new JButton("Press me", new ImageIcon(getClass()
.getResource("image\\ukIcon.gif")));
con.setLayout(new FlowLayout());
con.add(jb_ok);
jb_ok.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (imageNum == 1) {
jb_ok.setIcon(new ImageIcon(getClass().getResource(
"image\\usIcon.gif")));
imageNum = 2;
} else {
jb_ok.setIcon(new ImageIcon(getClass().getResource(
"image\\ukIcon.gif")));
imageNum = 1;
}

}
});
}
}

------解决方案--------------------
shell窗口需要设置jar包路径 查一下相关命令~
------解决方案--------------------
html文件没写完全