This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Let's start at the beginning: how can you tell it isn't working?
Moe Kennedy
Greenhorn
Joined: Aug 29, 2011
Posts: 7
posted
0
Hi
Paul Clapham wrote:Let's start at the beginning: how can you tell it isn't working?
When I try to run one of these files, an error appears:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method main cannot be declared static; static methods can only be declared in a static or top level type
at server.SimpleChatServer$ClientHandler.main(SimpleChatServer.java:40)
That message says that your "public static void main" method shouldn't be inside that nested class. Move it out of there so that it's a method of SimpleChatServer.
Moe Kennedy
Greenhorn
Joined: Aug 29, 2011
Posts: 7
posted
0
Paul Clapham wrote:That message says that your "public static void main" method shouldn't be inside that nested class. Move it out of there so that it's a method of SimpleChatServer.