Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

java & xml


  • Please log in to reply

#1
jmmastey

jmmastey

    New Member

  • Member
  • Pip
  • 2 posts
I am working through an example from a book
http://www.oreilly.c...atalog/javaxml2 and no matter what I try, I am not able to get this program working. I have tried different IDEs, different versions of Java, no luck on debugging, etc. A copy of the source code can be found here:
http://www.desoler.c...iewer.java.html
When I run the code, I get the following error:
java.lang.ClassCastException
at sun.applet.AppletPanel.createApplet(AppletPanel.java:619)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:548)
at sun.applet.AppletPanel.run(AppletPanel.java:299)
at java.lang.Thread.run(Thread.java:534)
This happens as the class is instantiated, and I am unable to do anything before the code executes. Any ideas?
- Joe -

Edited by stu_design, 10 June 2005 - 10:58 AM.

  • 0

Advertisements


#2
stu_design

stu_design

    Member

  • Member
  • PipPipPip
  • 217 posts
ok i read the code, but i need to see linme numbers

could u please send the code thats at lines or the code chunks in the general area

will give me better desciption and meat to work with

( ;) lazy to count all lines :tazz: ) lots of code!!!

299
534
548
619

Stu Design

Edited by stu_design, 10 June 2005 - 11:00 AM.

  • 0

#3
jmmastey

jmmastey

    New Member

  • Topic Starter
  • Member
  • Pip
  • 2 posts
That's the bizarre thing, it happens as the class is instantiated. The same problem occurs if you empty everything out of the class and leave nothing but the header:

/* only code in SAXTreeViewer.java for test */
public class SAXTreeViewer extends JFrame {
}

I am so totally confused by this. Is it possible that the class sun.applet.AppletPanel has some sort of glitch in it?

-joe-
  • 0

#4
stu_design

stu_design

    Member

  • Member
  • PipPipPip
  • 217 posts
ClassCastException

Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP