This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Applets and the fly likes java.lang.ClassCastException: while executing applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "java.lang.ClassCastException: while executing applet" Watch "java.lang.ClassCastException: while executing applet" New topic
Author

java.lang.ClassCastException: while executing applet

Khushwinder Chahal
Ranch Hand

Joined: Oct 03, 2007
Posts: 128
Hi All,

I am trying to executing an applet from my web application through jar file.
The code is like this :

applet code="org.jsresources.apps.chat.Chat" archive="voicechat.jar"


Its working fine except one thing.
On jsp page while executing its also through the following err in the java console of the browser(both in IE and Firefox).

The err is :
java.lang.ClassCastException: org.jsresources.apps.chat.Chat
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)

Though the application is running i am still getting this err..
Anybody have an idea please help me.
I need it urgently.

Thanks and Regards.


Khushwinder
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41137
    
  45
Does the Chat class implement the java.applet.Applet interface?


Ping & DNS - my free Android networking tools app
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java.lang.ClassCastException: while executing applet
 
Similar Threads
Reg: Running Swing in Browser
problem in running the application through applet
java.lang.ClassCastException:
Using Jaxb in applet
java lang IllegalArgumentException: No line matching interface TargetDataLine support