SallyZhao
06-14-2006, 11:41 AM
Hi,
I am new to java applet and got stuck in using it. I am starting with the clock example provied on web. I download the source code and compiled in JDK1.5.0_06 and try to display the applet in IE browser. As I did the web page using NetBean5.5 web application template, the applet class appeared in the classes folder under WEB_INF. The following is the web page script:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<applet codebase="classes" code="Clock.class" height="200" width="200"></applet>
</body>
</html>
When I run the web page, the browser just display a grey blank box and the Java console tells me this error message:
Microsoft (R) VM for Java, 5.0 Release 5.0.0.3810
==============================================
? help
c clear
f run finalizers
g garbage collect
m memory usage
q quit
t thread list
==============================================
java.lang.ClassNotFoundException: Clock
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/applet/AppletPanel.securedClassLoad
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run
I have no idea about this. Can anybody help please? Thanks in advance.
I am new to java applet and got stuck in using it. I am starting with the clock example provied on web. I download the source code and compiled in JDK1.5.0_06 and try to display the applet in IE browser. As I did the web page using NetBean5.5 web application template, the applet class appeared in the classes folder under WEB_INF. The following is the web page script:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<applet codebase="classes" code="Clock.class" height="200" width="200"></applet>
</body>
</html>
When I run the web page, the browser just display a grey blank box and the Java console tells me this error message:
Microsoft (R) VM for Java, 5.0 Release 5.0.0.3810
==============================================
? help
c clear
f run finalizers
g garbage collect
m memory usage
q quit
t thread list
==============================================
java.lang.ClassNotFoundException: Clock
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/applet/AppletPanel.securedClassLoad
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run
I have no idea about this. Can anybody help please? Thanks in advance.