Results 1 to 2 of 2
- 09-23-2010, 12:02 PM #1
Member
- Join Date
- Sep 2010
- Posts
- 2
- Rep Power
- 0
NoClassDefFoundError: Can't find the class
Hi,
I’ve working on a project in my class where we use a framework called JCAF which is a jar file that we import into eclipse and then add it to the build path but a problem arises when I try to run the application and not when my teammember is. It should say that we use CVS so everything is exactly identical on both computers / eclipse. Furthermore are we both using Windows 7 Pro 64-bit operating system.
The error is a bit complex to explain, so please ask if I need to clarify something.
In a packet called “assignment.main” we’ve got a java file called “DisplayListener.java” where your main method is located.
When I try to run the main, I get following error:
The problem is, that it should find the main class, because the Abstract class we use is located in the JCAF jar file and which is imported. At the very top of my DisplayListener.java, I’ve importedJava Code:Could not find the main class: assignment.main.DisplayListener. Program will exit
which it imports without any problems.Java Code:dk.pervasive.jcaf.EntityListener;
In my Eclipse Console window I get this error:
I’m not sure if it is the problem or it is located another place but I have a strong assumption that it is the JCAF framework and the jar file because the code otherwise is identical to my teammembers which, as said, works fine.Java Code:java.lang.NoClassDefFoundError: dk/pervasive/jcaf/EntityListener
Does anyone knows what or how to solve the problem? I’ve tried to find the error with no luck.
Sincere
- Mestika
- 09-23-2010, 03:17 PM #2
How are you trying "to run" the program? What is the commandline you use?When I try to run the main,
What folder are you in when you issue the java command?
Has the program been compiled successfully?
Is this an IDE configuration problem? If so, try asking how to configure your IDE on a forum for the IDE.
Similar Threads
-
"Could not find the main class: comparisonDemo.class. Program will exit."
By ziisrick in forum New To JavaReplies: 6Last Post: 05-18-2010, 05:11 PM -
One solution to NoClassDefFoundError for main class
By dragonmage in forum EclipseReplies: 6Last Post: 04-15-2010, 03:50 AM -
Class is there but NoClassDefFoundError
By jallmer in forum NetBeansReplies: 7Last Post: 11-19-2009, 03:37 AM -
Able to find class file in WEB-INF/classes but not after add sub folders in class dir
By vitalstrike82 in forum Web FrameworksReplies: 0Last Post: 05-13-2008, 06:16 AM -
java.lang.NoClassDefFoundError Exception when I invoke to a class outside projectEJB
By Daniel in forum Enterprise JavaBeans (EJB)Replies: 1Last Post: 07-06-2007, 06:08 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks