No class Defintion error - Jbuilder being annoying.

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: No class Defintion error - Jbuilder being annoying.

Hybrid View

  1. #1
    Join Date
    Nov 2006

    No class Defintion error - Jbuilder being annoying.

    I have a JBuilder project that has three classes. One of the classes "" uses "" and "" and compiles and runs perfectly when i open it all using the jbuilder .jpx project file.

    However if i open them all seperatly into JBuilder, or even just try and run XmlParser in command prompt, it says the noClassDefinition error stuff.

    Also another thing i noticed is that when i even try and compile XmlParser in command prompt it wont work saying theres errors with the Update and Link classes variables and methods etc found in XmlParser. ie its not realising it requires the other classes, even though theyre all in the same package&folder.

    Why wont it run as a unit outside of the Jbuilder project, eh, thing?
    Thanks, kate

  2. #2
    Join Date
    Jan 2007

    The NoClassDefinitionFound is caused by that the java command doesn't find
    defined class(es) in the, so you must define the CLASSPATH permanently or run java as: java -cp . XmlParser .

    Hope this helps!

  3. #3
    Join Date
    Nov 2006
    Do you mean classpath to javac, or to the other classes "Update" and "Link"? If its the latter, how do you physically point it at them? If its the first, thats already set - ive had java running on this machine for years.

    I really dont understand thought why it compiles and runs fine through "jbuilder project" but not through explicitly specifying that i want to run XmlParser, or by calling it in cmd.

  4. #4
    Join Date
    Jan 2007
    I mean the CLASSPATH to java, to use packages correctly outside an IDE you must have the corresponding folder structure. If you have source file in a package called the corresponding folder structure is: CLASSPATH/foo/bar/ .

  5. #5
    Join Date
    Nov 2006
    i managed to squish everything into the one class (albeit a slight loss to functionality), did the classpath and yey it works! thank you!

Similar Threads

  1. Replies: 26
    Last Post: 12-01-2012, 04:12 AM
  2. Objects disposed incorrectly
    By Osiris43 in forum .NET
    Replies: 1
    Last Post: 08-04-2006, 12:15 PM
  3. JDOM Classpath Help Required
    By kpandya in forum Java
    Replies: 5
    Last Post: 01-15-2006, 07:10 PM
  4. Help with class/applet
    By none_none in forum Java
    Replies: 17
    Last Post: 04-28-2005, 03:00 PM
  5. Replies: 5
    Last Post: 10-17-2002, 01:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center