Results 1 to 4 of 4
  1. #1
    seejay is offline Member
    Join Date
    Jan 2011
    Posts
    2
    Rep Power
    0

    Default -Xlint / -Deprecation Error

    Sorry if I'm in the wrong area or on the wrong site to ask this question but... I've read that this is a Java issue:

    There is a program called 'Rsbot' which is, in a way, a 'cheat engine' for the online game Runescape. You can add different scripts so that the scripts will perform different actions in the game (people post full scripts online).

    After adding a script by saving a notepad file as .java etc... I click compile-scripts under the Rsbot folder in my documents and usually the Run screen pops up showing me if my scripts compiled into .jar files or not.

    Whenever i try to add any form of script to my bot i get this error in the Run screen (after clicking the compile-scripts icon):
    --
    Looking for JDK
    Compiling scripts
    Note: Scripts\Sources\(script name).java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Press any key to continue . . .
    --

    Thank you for anyone that can help!

  2. #2
    goldest's Avatar
    goldest is offline Senior Member
    Join Date
    Oct 2009
    Location
    Pune, India
    Posts
    469
    Rep Power
    6

    Wink

    Deprecated API is nothing but the API which in no more supported. Seems like your java program is trying to use the methods which are deprecated. The compiler will check for the deprecated method things, but it's not actually an error. It's a kind of warning.

    But it's not advised to leave it as it is. You can use the option

    Java Code:
    javac -Xlint:deprecation class_file.java
    OR 
    javac -deprecation class_file.java
    while you compile your java file.

    This would give you details of the deprecated methods which were attempted to be used. Then you can find out some alternative to replace those methods with non-deprecated methods.

    Hope that helps,

    Goldest
    Java Is A Funny Language... Really!
    Click on * and add to member reputation, if you find their advices/solutions effective.

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,733
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by seejay View Post
    Sorry if I'm in the wrong area or on the wrong site to ask this question but... I've read that this is a Java issue:

    There is a program called 'Rsbot' which is, in a way, a 'cheat engine' for the online game Runescape. You can add different scripts so that the scripts will perform different actions in the game (people post full scripts online).

    After adding a script by saving a notepad file as .java etc... I click compile-scripts under the Rsbot folder in my documents and usually the Run screen pops up showing me if my scripts compiled into .jar files or not.

    Whenever i try to add any form of script to my bot i get this error in the Run screen (after clicking the compile-scripts icon):
    --
    Looking for JDK
    Compiling scripts
    Note: Scripts\Sources\(script name).java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Press any key to continue . . .
    --
    Your 'script' uses a method that is no longer supported or 'deprecated'. Your compiler warns about it and by using the flag -Xlint you can get detailed information about it. Read the API documentation for the method: a description is shown for an alternative.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  4. #4
    seejay is offline Member
    Join Date
    Jan 2011
    Posts
    2
    Rep Power
    0

    Default

    javac -deprecation class_file.java

    So save the notepad document with the script in it under:

    javac -deprecation AIORuneCrafter.java (AIORuneCrafter is the public-class name/script name)

    Edit: Saved as what i said above^ and got the error again
    __________________________________________________ ______________

    Also... can i save this script in any other way and still have it work using the program?

    I also have skype if anyone can just get on skype and have a quick-fix chat instead of waiting hours/days for replies
    Last edited by seejay; 01-15-2011 at 12:58 AM.

Similar Threads

  1. xlint full form
    By java4susant in forum New To Java
    Replies: 0
    Last Post: 10-27-2010, 03:08 AM
  2. unchecked or unsafe operations-Recompile with -Xlint
    By pronetin in forum Advanced Java
    Replies: 15
    Last Post: 05-31-2010, 06:41 PM
  3. Replies: 1
    Last Post: 12-05-2009, 08:28 AM
  4. How was deprecation handled before annotations ?
    By ajeeb in forum New To Java
    Replies: 0
    Last Post: 03-20-2009, 12:44 PM
  5. Xlint in build.xml not working
    By sunjavaboy in forum Eclipse
    Replies: 0
    Last Post: 06-23-2008, 02:35 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
  •