my dog learned polymorphism*
The moose likes Java in General and the fly likes warning messaged during compile Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "warning messaged during compile" Watch "warning messaged during compile" New topic
Author

warning messaged during compile

william kane
Ranch Hand

Joined: Nov 21, 2000
Posts: 260
I have two queries
1.Is it possible to set debug levels for warning displayed during compilation?
2.Will there be any warning messages displayed during compilation other than messages for use of deprecated api?
Thanks in advance


Help me!Help you!!!
Kripal Singh
Ranch Hand

Joined: Jul 26, 2001
Posts: 254
have a look at tools doc . talking about j2se 5.0

http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html

here are some options

user the option
-nowarn
Disable warning messages. This has the same meaning as -Xlint:none.

deprecation
Show a description of each use or override of a deprecated member or class. Without -deprecation, javac shows the names of source files that use or override deprecated members or classes. -deprecation is shorthand for -Xlint eprecation.

see other Non-Standard Options


# Help an unprivileged kid.<br /> Whatever u do will make a difference...<br /> ...to a child's life & ur own #<br /><a href="http://www.cry.org/" target="_blank" rel="nofollow">www.cry.org/</a>
william kane
Ranch Hand

Joined: Nov 21, 2000
Posts: 260
Originally posted by Kripal Singh:
have a look at tools doc . talking about j2se 5.0

http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html

here are some options

user the option
-nowarn
Disable warning messages. This has the same meaning as -Xlint:none.

deprecation
Show a description of each use or override of a deprecated member or class. Without -deprecation, javac shows the names of source files that use or override deprecated members or classes. -deprecation is shorthand for -Xlint eprecation.

see other Non-Standard Options


Thanks kripal for that clarification.
To futher my query,In my experience with java ,the compiler only displays warning messages to show that depricated api has been used. Are there any other warning messaged displayed during compile.
If yes,can i set debug levels and choose to view some and supress some.
Thanks in Advance
William
Jeff Bosch
Ranch Hand

Joined: Jul 30, 2003
Posts: 804
In the Java compiler itself I don't believe you can do that. However, many Java IDEs like Eclipse do support customizization of warning reporting.


Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
Scott Dunbar
Ranch Hand

Joined: Sep 23, 2004
Posts: 245
I've gotten things like:



or if you are compiling without using the -source when I have a method named assert().

Either way, I'd really encourage you to pay attention to the warnings. Every once in a while they are harmless but they almost always are something to pay attention to.


<a href="http://forums.hotjoe.com/forums/list.page" target="_blank" rel="nofollow">Java forums using Java software</a> - Come and help get them started.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: warning messaged during compile