• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

beginners guide to using SAX

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Im running the following code. using jdk1.5.0_04. Do i need to add anything to use sax. I think i might need a package but i dont know.
I get a no class def found error.

The tutorial Im using is here, the code is below

http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/TOC.html

 
lupercal hill
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I dont need to do anything to import SAX. The problems I had were due to me using argv instead of args.

public static void main(String argv[])

public static void main(String args[])
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If your code looks exactly like the above, the problem was not in the fact that you used the name "argv" instead of "args". It's just a variable name, it does not cause a ClassNotFoundException.

You probably hadn't your classpath set up correctly.
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jesper de Jong:
If your code looks exactly like the above, the problem was not in the fact that you used the name "argv" instead of "args". It's just a variable name, it does not cause a NoClassDefFoundError.

You probably hadn't your classpath set up correctly.

 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lupercal Hill,

I'm not really sure what you mean by this:


I dont need to do anything to import SAX. The problems I had were due to me using argv instead of args.

public static void main(String argv[])

public static void main(String args[])



I feel the name in the parameter should not matter, as long as you use the same name inside your method body. Of course you wouldn't want to use any of the keywords here.
 
reply
    Bookmark Topic Watch Topic
  • New Topic