in the newer versions of java some methods have been deprecated . so if u want to compile that file u should use javac -deprecation <filename.java> . this would reduce the error to a warning . and u can easily run the program.
Impossible is I M Possible
Joined: Dec 10, 2001
Let's be clear about something.
Compiling code that uses a deprecated method, without specifying the -deprecation switch, the compiler generates a warning - not an error - letting you know that a deprecated API was used by the just-compiled source code.
Compiling code that uses a deprecated method, while specifying the -deprecation switch*, generates a more detailed warning message, lising the line of code where the deprecated API was used.
In no case does using a deprecated API cause code to not be compiled.
* Note: With Java 2 v5, the compiler suggests using -XLint:deprecation switch. [ September 17, 2004: Message edited by: Dirk Schreckmann ]