Results 1 to 8 of 8

Thread: Deprecation

  1. #1
    gbediako1 is offline Member
    Join Date
    Dec 2013
    Posts
    4
    Rep Power
    0

    Unhappy Deprecation

    I'm very new to Java, and I'm supposed to create this applet that draws squares and then fills each square with a random color, but I get this error saying that some part of my code is deprecated. I want to find out what part it is so I can find out what I should use, but I don't know how to find that. I see that it tells me to recompile with -Xlint: deprecation for details but I don't know where I'm supposed to put that. We use TextPad in my class.

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,969
    Rep Power
    8

    Default Re: Deprecation

    Do you compile using the command line?

    Here is a listing of many of your options, including -Xlint: javac - Java programming language compiler

    But warnings are just that, warnings. You can probably ignore them and your program will run fine. Might want to check with your instructor first though.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,036
    Rep Power
    20

    Default Re: Deprecation

    You add it to the compile command (javac).
    javac -Xlint:deprecation <the rest of the command you would normally use>
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  4. #4
    gbediako1 is offline Member
    Join Date
    Dec 2013
    Posts
    4
    Rep Power
    0

    Default Re: Deprecation

    I don't compile using command line. That's why I keep getting confused on where I'm supposed to write that line.

    Thanks for the link!

  5. #5
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,969
    Rep Power
    8

    Default Re: Deprecation

    Then how do you compile your program? I'm not familiar with TextPad.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  6. #6
    gbediako1 is offline Member
    Join Date
    Dec 2013
    Posts
    4
    Rep Power
    0

    Default Re: Deprecation

    I write the code in the coding window of TextPad and then click on 'Compile Java' under 'Tools' on the toolbar and then in the command results window is where it tells me if things are successful or if there are any errors. So, I guess I meant to say that I don't use, command line directly because when I actually run applets, the command line window does come up behind the applet window but there's usually nothing in it.

  7. #7
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,969
    Rep Power
    8

    Default Re: Deprecation

    You might want to find how to pass command line arguments to the Java compiler from TextPad. Sounds like a job for google.

    Or you could just use the command line and use the argument directly.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  8. #8
    gbediako1 is offline Member
    Join Date
    Dec 2013
    Posts
    4
    Rep Power
    0

    Default Re: Deprecation

    Ok, I will do that. Thanks so much for your help!

Similar Threads

  1. Replies: 24
    Last Post: 07-29-2011, 04:53 PM
  2. -Xlint / -Deprecation Error
    By seejay in forum New To Java
    Replies: 3
    Last Post: 01-14-2011, 11:25 PM
  3. How was deprecation handled before annotations ?
    By ajeeb in forum New To Java
    Replies: 0
    Last Post: 03-20-2009, 11:44 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
  •