Solved

Main Class in Run Configuration - Edit Configuration

Posted on 2008-10-21
9
317 Views
Last Modified: 2013-12-15
Hello,
I have been working with two java files all day, then towards the end of the day I must of inadvertantly made some change that at one time I was getting this error: NoClassDefFoundError
I checked my CLASSPATH environment setting and it is correct.  At least I have the path up to src.  And it was working this morning and early afternoon.  And the package statements are correct.
Then, like a fool I deleted my existing RUN Configuration settings.  Now when I try to set the "Main Class" in the RUN Configuration - Edit Configuration window, it is not finding the java file with main, via Search.
What might be the cause of this problems?
0
Comment
Question by:chima
  • 5
  • 4
9 Comments
 
LVL 6

Expert Comment

by:javaexperto
ID: 22772786
It appears that when you set your Main class the Java Virtual Machine or a ClassLoader can't find the definition of a class, in other words can't find .class file. Try to compile your files again and make sure that are in the correct place.
0
 

Author Comment

by:chima
ID: 22776482
javaexperto, I got out of this mess, but don't exactly know how.  I reverted back to some older CVS files, but that did not help.  The problem was with my local Eclipse setup.  I imported an old image I had, but that did not work.  Then I notices that my Package Explorer was displaying the wrong package path.
I don't recall what I did next, but I am back an running.
A quick question for you; Can you see my "profile?"  The reason why I ask, is that your name is javaexperto.  I take it that you are Spanish...maybe?  Chima is short for Chimayo, my home town.
0
 
LVL 6

Expert Comment

by:javaexperto
ID: 22776556
Que tal, no soy español soy mexicano,  quizá puedo aclarar mejor tus dudas en español jeje. Saludos
0
 

Author Comment

by:chima
ID: 22778374
Que Bueno! But my Spanish is slow at typing.
My problem is back: Main class not found.  What is happening is that I have one file that is working and the other is not.  They are both in the same project and package.  My Edit Configuration settings are correct, but do not seem to work.
There is a developer here, his name is Oguer G. from Chihuahua, Mexico.  Where are you at?
Can you view my profile?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 6

Accepted Solution

by:
javaexperto earned 500 total points
ID: 22778480
Could you tell me wich IDE are you using? I think it is not an error from the virtual machine, i think the problem is in your enviroment. I'm from Cuernavaca Morelos and I can view your profile.
0
 

Author Comment

by:chima
ID: 22780188
experto! I am using Eclipse Ganymede version 3.4.0.  I have one that is working and the other does not.
My last name is Martinez.  I do speak Spanish, but my writing of Spanish is slow.
0
 

Author Comment

by:chima
ID: 22780405
The problem is no longer popping up.  Do not ask me what I did, but it is gone.
I will wait for your response before I close this issue.
thanks
0
 
LVL 6

Expert Comment

by:javaexperto
ID: 22781573
did you solve the problem?
0
 

Author Closing Comment

by:chima
ID: 31508571
Yes, it got solved by itself.  I do not know what I did to make it work.
Now I am trying to make the files work with JUnit.  Another HEADACHE!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now