velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jill han" <j...@bynum.com>
Subject RE: applet
Date Mon, 09 May 2005 20:38:44 GMT
I moved Star.class to the folder where the template sits. And change the
applet tag to 
		
<table cellpadding=0 cellspacing=0 border=0 width="808">     	  
<APPLET CODE='Star.class' WIDTH = 300 HEIGHT = 300>  </APPLET> 
</table>

The message from Jave Console is like:
**********************
Java(TM) Plug-in: Version 1.4.2_05
Using JRE version 1.4.2_05 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\jhan.BLR

Proxy Configuration: No proxy

----------------------------------------------------
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
p:   reload proxy configuration
q:   hide console
r:   reload policy configuration
s:   dump system properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
java.lang.ClassFormatError: Star (Bad magic number)

	at java.lang.ClassLoader.defineClass0(Native Method)

	at java.lang.ClassLoader.defineClass(Unknown Source)

	at java.security.SecureClassLoader.defineClass(Unknown Source)

	at sun.applet.AppletClassLoader.findClass(Unknown Source)

	at java.lang.ClassLoader.loadClass(Unknown Source)

	at sun.applet.AppletClassLoader.loadClass(Unknown Source)

	at java.lang.ClassLoader.loadClass(Unknown Source)

	at sun.applet.AppletClassLoader.loadCode(Unknown Source)

	at sun.applet.AppletPanel.createApplet(Unknown Source)

	at sun.plugin.AppletViewer.createApplet(Unknown Source)

	at sun.applet.AppletPanel.runLoader(Unknown Source)

	at sun.applet.AppletPanel.run(Unknown Source)

	at java.lang.Thread.run(Unknown Source)

*********************************


Any suggestions?

Thanks.


-----Original Message-----
From: Shinobu Kawai [mailto:shinobu.kawai@gmail.com] 
Sent: Monday, May 09, 2005 2:57 PM
To: Velocity Users List
Subject: Re: applet

Hi jill,

> I tried to put an applet into a velocity template like:
> 
> <table cellpadding=0 cellspacing=0 border=0 width="808">
>        <APPLET CODE = '$content.getURI("applet/Star.class")'
>                WIDTH = 300 HEIGHT = 300>
>        </APPLET>
> 
> </table>
> In the rendered page, $content.getURI("applet/Star.class") was parsed
as
> http://localhost/neo/applet/Star.class

I think you mixing up CODE and CODEBASE.
  http://java.sun.com/j2se/1.4.2/docs/guide/misc/applet.html

Best regards,
-- Shinobu

--
Shinobu Kawai <shinobu.kawai@gmail.com>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message