Well, if Eclipse "shows that there are errors and warnings" then that class is probably not being compiled and so the project does not contain an executable main class. Fix the "errors and warnings", first.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
Click the Src package u have made, i think you must clicked some library and running the application....
Majestics
Practically a Master Poster
621 posts since Jul 2007
Reputation Points: 199
Solved Threads: 49
it will be very easy for us if u take two or three snapshot of your screen and load here.............
Majestics
Practically a Master Poster
621 posts since Jul 2007
Reputation Points: 199
Solved Threads: 49
@ Masijade, These packages and projects are from a book. Therefore, they are not written for readers to complete them; they're meant to help readers understand how an app works and play around with the code.
Okay? And? How does that change anything I said? If it doesn't compile it is not a main class. It is anattempt at a main class, but until it compiles there is nothing for Eclipse to execute.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
Please post pictures..... I already told u , no body guess what the problem is.
Majestics
Practically a Master Poster
621 posts since Jul 2007
Reputation Points: 199
Solved Threads: 49
well .. just posting
public static void main(String[] args){
says nothing. for all we know, this main method is declared within another method.
so, show the error message (stacktrace, ...) you get, and post some code in which we can see something.
stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
It is strange that eclipse doesn't find any code to execute. How do you think I can possibly fix the issue?
You said that Eclipse "shows errors". Well, how do you propose that Eclipse execute anything that isn't compiled? This is not a scripting language, you know. As I said,fix those errors.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
I remember having a similar problem, it was saying couldn't find the main, but it was there... I think I solved it just by refreshing the src folder in eclipse, not sure anyway. And I don't know why it said that in the first place
a.oprea
Junior Poster in Training
52 posts since Jul 2011
Reputation Points: 10
Solved Threads: 3
You have 689 uncorrected compile-time errors. Yet you say
It is strange that eclipse doesn't find any code to execute. How do you think I can possibly fix the issue?
There won't be any code to execute until the compiler generates some. The compiler won't compile your code until you fix the errors. Start with the first error and keep fixing them until they are all fixed. Then you will get some code to execute.
ps: Such a large number of errors suggests that you have problems with your project setup, eg incorrect path(s) - but the detailed messages will spell it out for you.
JamesCherrill
Posting Genius
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
Bear in mind that I'm still new to Java language..
That may be so, but Java and Eclipse work the same way regardless of your experience
JamesCherrill
Posting Genius
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
I've already told you that until it compiles there is nothing to execute.
And, as far as being new goes, then you need to start with something simpler, such as the official tutorials.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
I never ever down-voted on all forums where I member of, you are 1st. candidate during this month, are you thinking about that all posters in this thread just wasted her/his time for your ...., everything is wrong
mKorbel
Veteran Poster
1,141 posts since Feb 2011
Reputation Points: 480
Solved Threads: 224