Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm getting a message when I compile my code:

Note: H:Project2MyGui2.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

How do I recompile with -Xlint:unchecked?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
378 views
Welcome To Ask or Share your Answers For Others

1 Answer

Specify it on the command line for javac:

javac -Xlint:unchecked

Or if you are using Ant modify your javac target

  <javac ...>
    <compilerarg value="-Xlint"/>
  </javac> 

If you are using Maven, configure this in the maven-compiler-plugin

<compilerArgument>-Xlint:unchecked</compilerArgument>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...