Main Class in Run Configuration - Edit Configuration

Posted on 2008-10-21
Last Modified: 2013-12-15
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?
Question by:chima
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4

Expert Comment

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.

Author Comment

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.

Expert Comment

ID: 22776556
Que tal, no soy español soy mexicano,  quizá puedo aclarar mejor tus dudas en español jeje. Saludos
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users


Author Comment

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?

Accepted Solution

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.

Author Comment

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.

Author Comment

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.

Expert Comment

ID: 22781573
did you solve the problem?

Author Closing Comment

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!

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This video teaches viewers about errors in exception handling.

617 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