• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to suppress comiler warnings?

 
Pete Mosca
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have legacy code with lots of deprication warnings. How do I turn them off during compilation?
 
fred rosenberger
lowercase baba
Bartender
Posts: 12188
34
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how about using the -nowarn flag? or do you JUST want to supress the deprecation warnings, and see the others?
 
Pete Mosca
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe that -nowarn is not an option for the java command. At least not for 1.4.
 
Pete Mosca
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops! I mispoke. Please ignore my previous post.
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a) rewrite the code. sooner or later it will stop compiling.
b) why to compile it at all?
 
Pete Mosca
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fred, thanks for the help.
Stefan, you are just plain obnoxious.
 
Alangudi Balaji Navaneethan
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why dont try,
javac -deprication file.java
 
Alangudi Balaji Navaneethan
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you tried,
javac/? for more options on compiling didn't you?
 
Tony Morris
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
'java' is not a compiler.
The -nowarn option is avialable for the compiler, 'javac'.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic