How to recompile with -Xlint in java netbeans?

Mitesh picture Mitesh · Oct 1, 2015 · Viewed 8.3k times · Source

How do i recompile my java program with -Xlint as indicated by the java compiler. I am using netbeans 8.1 beta version.

Note: E:\NetBeansProjects\Project21\MyCode\src\mycode\MyCode.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. I am using netbeans gui to run the program file.

What should i do to remove this warning?

Answer

sstan picture sstan · Oct 1, 2015

You can add that compiler option like this:

  1. Open your project Properties page.
  2. Go to Build --> Compiling
  3. At the bottom of the window, look for Additional Compiler Options
  4. Type -Xlint:unchecked in the textbox.