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

Coderanch | Moe Kennedy | 5 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Simple Chat Problem

    Coderanch | 5 years ago | Moe Kennedy
    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

    Root Cause Analysis

    1. 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()
    2. server
      SimpleChatServer$ClientHandler.main
      1. server.SimpleChatServer$ClientHandler.main(SimpleChatServer.java:40)
      1 frame