-
No class Defintion error - Jbuilder being annoying.
I have a JBuilder project that has three classes. One of the classes "XmlParser.java" uses "Link.java" and "Update.java" 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
-
Hello,
The NoClassDefinitionFound is caused by that the java command doesn't find
defined class(es) in the XmlParser.java, so you must define the CLASSPATH permanently or run java as: java -cp . XmlParser .
Hope this helps!
-
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.
-
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 blaa.java in a package called foo.bar the corresponding folder structure is: CLASSPATH/foo/bar/blaa.java .
-
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
-
Replies: 26
Last Post: 12-01-2012, 04:12 AM
-
By Osiris43 in forum .NET
Replies: 1
Last Post: 08-04-2006, 12:15 PM
-
Replies: 5
Last Post: 01-15-2006, 07:10 PM
-
By none_none in forum Java
Replies: 17
Last Post: 04-28-2005, 03:00 PM
-
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
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks