我有一个直接在我的 html 页面中的小程序。它使用 4 个其他文件。我收到 NoClassDefFound 错误。我的 html 文件与我的 .class 文件位于同一目录中,如下所示:
<html>
<body>
<h1>Here is my Asteroids game!</h1>
<applet codebase = "." code = "Asteroids.class" name = "Asteroids" width = "640" height = "480" hspace = "0" vspace = "0" align = "middle">
</applet>
</body>
</html>
我正在使用 Internet Explorer,我的其他小程序工作正常。我需要在我的<applet>
标签中包含其他文件吗?
完整错误:
Java Plug-in 10.6.2.24
Using JRE version 1.7.0_06-b24 Java HotSpot(TM) Client VM
User home directory = C:\Users\Stafford
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
堆栈跟踪:
asteroids:(wrong name asteroids/Asteroids)