first time poster; did a search for this and couldn't find the answer. I'm working out of the java & xml book, the chapter on sax. I typed the examples he gives as I was reading (I'm working in eclipse) and I don't think it's running correctly.
Also, the online example that he gives won't run on my machine. It compiles with this message:
then when I try to run the program I get:
It's a little bit confusing the way he has it set up; he gives code examples for all the stuff in the class that implements the ContentHandler interface, but he excludes all the import statements and anything that isn't directly related to the methods he's covering in the book. The problem is, that when he tells you to run the code for the first time; the program calls a method (init() method)that he hasn't explained, and it's significant, because it has nodes in it and calls the method gets to the ContentHandler stuff.
posted 12 years ago
I ran a little "hello world" test program in that directory, so I don't think it's a classpath thing. thanks, bp
Hello 'Badperson', Welcome to the Ranch. I havent read this book but I think you have a recent as in 5.0 or 6.0 compiler but youre not making use of the features provided by it, particularly relating to generics, thats what the unsafe warning is about. About your runtime exception that seems entirely unrelated to that and perhaps has to do with your java runtime version conflicting in some way with your java compiler. are the 2 versions same? [ May 09, 2007: Message edited by: Amitabha Batranab ]
We have a naming convention on the 'ranch, which we ask all members to use. Basically, you need to use a real(ish) first and last name. So, no John Smith, and nothing that our international moderators would recognize as fake.
thanks for the replies. Still not really able to get the example to run, but like a total goof, the one I did was actually okay; it's done with swing, and I wasn't expanding the tree under the title of the document....
still not sure why the example isn't running though. jw