Solved

Main Class in Run Configuration - Edit Configuration

Posted on 2008-10-21
9
318 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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
 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

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 Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
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…
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 …

770 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