我是php和applet的新手。我使用easyphp http://www.easyphp.org/设置我的本地网络来测试我的代码。在easyphp www文件夹中,我放了我的php文件和类文件(对于我的applet)。当我运行easyphp来测试我的代码时,它不会加载applet,这里是错误:
load: class MainForm.class not found.
java.lang.ClassNotFoundException: MainForm.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassNotFoundException: MainForm.class
load: class MainForm.class not found.
java.lang.ClassNotFoundException: MainForm.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) ....
这是我的PHP代码:
<Html>
<Head>
<Title>Java Example</Title>
</Head>
<Body>
Test 1<br>
<br>
<Applet Code="MainForm.class" width=200 Height=100>
</Applet>
</Body>
</Html>
我应该如何解决此问题才能显示我的applet?