Solved

Main Class in Run Configuration - Edit Configuration

Posted on 2008-10-21
9
314 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
Comment Utility
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
Comment Utility
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
Comment Utility
Que tal, no soy español soy mexicano,  quizá puedo aclarar mejor tus dudas en español jeje. Saludos
0
 

Author Comment

by:chima
Comment Utility
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 6

Accepted Solution

by:
javaexperto earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
did you solve the problem?
0
 

Author Closing Comment

by:chima
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
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 …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

744 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

13 Experts available now in Live!

Get 1:1 Help Now