Thread: 1 Error

Results 1 to 2 of 2
  1. #1 1 Error 
    Officially Retired


    Join Date
    Oct 2007
    Age
    30
    Posts
    5,454
    Thanks given
    558
    Thanks received
    122
    Rep Power
    1364
    Code:
    src\server\Server.java:106: unreported exception java.lang.Exception; must be ca
    ught or declared to be thrown
                                    WalkingHandler.getSingleton().initialize();
                                                                            ^
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    1 error
    Press any key to continue . . .
    anyone can solve?
    Reply With Quote  
     

  2. #2  
    Registered Member
    Its paris's Avatar
    Join Date
    Apr 2009
    Posts
    1,141
    Thanks given
    56
    Thanks received
    234
    Rep Power
    689
    "must be caught or declared to be thrown"

    "must be caught":
    Code:
    try{
        WalkingHandler.getSingleton().initialize();
    }catch(Exception e){
        e.printStackTrace();
    }
    "or declared to be thrown":
    Code:
    public void initialize() throws Exception {
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •