aspose file tools*
The moose likes Java in General and the fly likes How to suppress comiler warnings? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to suppress comiler warnings?" Watch "How to suppress comiler warnings?" New topic
Author

How to suppress comiler warnings?

Pete Mosca
Greenhorn

Joined: Oct 15, 2002
Posts: 8
I have legacy code with lots of deprication warnings. How do I turn them off during compilation?
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 10923
    
  12

how about using the -nowarn flag? or do you JUST want to supress the deprecation warnings, and see the others?


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Pete Mosca
Greenhorn

Joined: Oct 15, 2002
Posts: 8
I believe that -nowarn is not an option for the java command. At least not for 1.4.
Pete Mosca
Greenhorn

Joined: Oct 15, 2002
Posts: 8
Oops! I mispoke. Please ignore my previous post.
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

a) rewrite the code. sooner or later it will stop compiling.
b) why to compile it at all?


http://home.arcor.de/hirnstrom/bewerbung
Pete Mosca
Greenhorn

Joined: Oct 15, 2002
Posts: 8
Fred, thanks for the help.
Stefan, you are just plain obnoxious.
Alangudi Balaji Navaneethan
Ranch Hand

Joined: Apr 28, 2004
Posts: 42
why dont try,
javac -deprication file.java


if you think you can you r right<br />if you think you can not you r double right
Alangudi Balaji Navaneethan
Ranch Hand

Joined: Apr 28, 2004
Posts: 42
I think you tried,
javac/? for more options on compiling didn't you?
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608
'java' is not a compiler.
The -nowarn option is avialable for the compiler, 'javac'.


Tony Morris
Java Q&A (FAQ, Trivia)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to suppress comiler warnings?
 
Similar Threads
Xlint Compiler Warnings from the Command-Line
How To Retrieve Warning in JDBC?
How to mark a method deprecated
warning in finally
Problems perspective in Eclipse doesnt show all the warnings