by, instead of calling javac <filename> calling javac -Xlint:deprecation <filename> and letting the compiler tell you exactly what it doesn't like. The message, however,is only a warning.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
it is a common problem when dealing with applet so you need to create an applet to view the output or if not an applet program look at the compillation options given to you after compilling
Huh? This is purely a compilation issue. What does applet, or not applet, haveanything to do with it?
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
And have you used that option to javac, yet? Using an option on a command line is not a Java issue, and if you do not know how to provide options and arguments to a command on the command line then you need to learn that, first. And, as said, that is not a Java issue.
If it is that you are using an IDE and don't know how to set the options in the IDE, well, read the user documentation for your IDE and find out how.
Once you have the respective issue corrected, then do that. If you still don't understand what's wrong, then post here what that compilation attempt gave you and we will help you further.
P.S. PM's asking for help are summarily ignored.
Edit: If you simply want the warning to "go away" then use the "@Deprecated" annotation (Google that) or use the "-nowarn" or "-Xlint:none" options to javac.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
So, as I said, post what it was you got.
P.S. You hopefully did not actually type
javac -Xlint deprecated file name.java
but rather javac -Xlint:deprecation filename.java
which is what the initial message said (for the option) and only common sense (for the argument) besides the fact that I had alreadyexplicitly posted that.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
It seems that you have not yet tried
"javac filename.java Xlint:deprecation"
method
try this or else
Post your code !
You have it wrong, though. See above.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
oh! sorry,
I forgot to put - sign before Xlint:deprecation
use:
"javac filename.java -Xlint:deprecation"
Thanx for pointing out my mistake !
You also have the option in the wrong position relative to the filename list. Thatis rather important.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
sir
sorry for wrong sentence.
after wriitnig the javac -Xlint:deprecation filename.java i got the warning
"[deprecation] show() in java.awt.Dialog has been deprecated fd.show()"
in open and save dialog box.
pls reply as soon as possible.
Okay. And have you looked at the API docs for Dialog to see if that method description suggests a solution?
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494