LWJGL Forum

Programming => OpenAL => Topic started by: Cottonwood on December 16, 2010, 12:26:03

Title: [solved] lwjgl Slick Sound; The method toURL() from the type File is deprecated
Post by: Cottonwood on December 16, 2010, 12:26:03
Eclipse brings up twice a message "The method toURL() from the type File is deprecated" for this sample: http://lwjgl.org/wiki/index.php?title=Slick-Util_Library_-_Part_2_-_Loading_Sounds_for_LWJGL

For me it seems so that it doesn't matter. Am I right or is there anything to change?
Title: Re: lwjgl Slick Sound; The method toURL() from the type File is deprecated
Post by: kappa on December 16, 2010, 12:32:40
seems that file.toURL() is depreciated in Java but should still work, you can however change it to use file.toURI().toURL() to make the message go away.

see
http://oohbegitu.wordpress.com/2007/10/08/deprecated-file-tourl-method-in-java-6/
Title: Re: lwjgl Slick Sound; The method toURL() from the type File is deprecated
Post by: Cottonwood on December 16, 2010, 13:16:39
Thank you. I changed it for me. I prefer to have no "deprecated" marked statements. Could sooner or later become depreciated. ;D ;)
Title: Re: [solved] lwjgl Slick Sound; The method toURL() from the type File is deprecated
Post by: kappa on December 16, 2010, 13:33:16
fair point, I've updated wiki to use non deprecated method.