File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes errors in java program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "errors in java program" Watch "errors in java program" New topic

errors in java program

Don Williams

Joined: Jun 02, 2006
Posts: 6
I am having a problem in a program that' s suppose to plot a graph of grades. This programs compiles ok, except for a generic error. I have had the program working before, but seem to have did something that I can' t seem to remember. I have been searching for a week, and have been working on this program for two weeks. Can you help?

Here is the code:

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63844

At the top of this forum you will find the words:

This forum is intended for questions and comments about this web site,
It is not for questions about the Java language - that's what all our other forums are for.

Accordingly, I have moved this post to the Java in General (beginner) forum.

[Asking smart questions] [About Bear] [Books by Bear]
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11955

what exactly is the error you're getting? that's usually a pretty big clue as to what the problem is.

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Don Williams

Joined: Jun 02, 2006
Posts: 6
The Error is;
Exception in thread "main" java.lang.NoSuchMethodError:main
Press any key to continue...
Jody Brown
Ranch Hand

Joined: Nov 09, 2005
Posts: 43
Do you see something wrong with your main(String[] args) method? look at how you have defined it, and then check one of your reference books on how to define a main method. You are missing a very important word in there.

And will that "throws IOException" cause trouble too? Not sure about that one off the top of my head.
Stephen Foy
Ranch Hand

Joined: Oct 17, 2005
Posts: 143
Your mai method is missing the word "static"

Stephen Foy - Microsoft Application Development Consultant
Don Williams

Joined: Jun 02, 2006
Posts: 6
Thanks everyone for your help. I had it working at one time, and screwed it up. I've been struggling with this thing for about a week, I guess I was thinking to hard.
I agree. Here's the link:
subject: errors in java program
It's not a secret anymore!