Results 1 to 6 of 6
  1. #1
    jon80's Avatar
    jon80 is offline Senior Member
    Join Date
    Feb 2008
    Location
    Malta (EU)
    Posts
    211
    Rep Power
    7

    Default [SOLVED] [error] TestOne at localhost:61825 contains obsolete methods

    Do you see any obsolete methods?

    :confused:

    import java.lang.*;

    public class TestOne {

    /**
    * @param args
    */
    public static void main(String[] args) {
    // TODO Auto-generated method stub

    String myString = "Hello";
    System.out.println(myString.substring(0,4));


    }

    }

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    The code seems fine. This appears a bit unnecessary:
    Java Code:
    import java.lang.*;
    but I doubt that it would harm anything.

  3. #3
    jon80's Avatar
    jon80 is offline Senior Member
    Join Date
    Feb 2008
    Location
    Malta (EU)
    Posts
    211
    Rep Power
    7

    Default

    Thanks you're right I "forgot" to take that one off :) Any idea what caused the error to show up?

  4. #4
    OrangeDog's Avatar
    OrangeDog is offline Senior Member
    Join Date
    Jan 2009
    Location
    Cambridge, UK
    Posts
    838
    Rep Power
    6

    Default

    I believe that's an error caused by the JVM containing "expired" code. This usually happens while hot-plugging code while the JVM is still running - in a debugging environment for example.

    To avoid it, make sure the JVM is shut down before recompiling any classes and re-start when done.
    Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
    How To Ask Questions The Smart Way

  5. #5
    jon80's Avatar
    jon80 is offline Senior Member
    Join Date
    Feb 2008
    Location
    Malta (EU)
    Posts
    211
    Rep Power
    7

    Default

    Quote Originally Posted by OrangeDog View Post
    I believe that's an error caused by the JVM containing "expired" code. This usually happens while hot-plugging code while the JVM is still running - in a debugging environment for example.

    To avoid it, make sure the JVM is shut down before recompiling any classes and re-start when done.
    Thanks, what does "hot-plugging code while the JVM is still running" mean?

  6. #6
    OrangeDog's Avatar
    OrangeDog is offline Senior Member
    Join Date
    Jan 2009
    Location
    Cambridge, UK
    Posts
    838
    Rep Power
    6

    Default

    "hot-plugging" means to change components around while things are turned on. In this case, to change class code while the program is running.
    Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
    How To Ask Questions The Smart Way

Similar Threads

  1. Replies: 2
    Last Post: 03-22-2009, 06:41 PM
  2. connecting to a wsdl on localhost
    By david99world in forum Eclipse
    Replies: 0
    Last Post: 01-23-2009, 10:25 PM
  3. Replies: 2
    Last Post: 11-21-2008, 08:36 PM
  4. Replies: 0
    Last Post: 06-07-2008, 09:02 PM
  5. Replies: 1
    Last Post: 08-07-2007, 06:45 AM

Posting Permissions

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