Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2007

Tip: Looking for answers? Try searching our database.

XLint

Thread view: 
Francois Lionet - 24 Apr 2007 18:14 GMT
Hello all,

I have a big project with more than 700 files. I work under Netbeans. When I
compile them I get a message saying that "Some input files use unchecked or
unsafe operations." and I am told to recompile with the "-XLint:unchecked"
to know more.
OK, but I cannot find where to put this operator, I have looked in the ant
file properties and no success. Can someone tell me where I can use this
operator and findout what is wrong with my source code?
Thanks in advance,

Francois
Eric Sosman - 24 Apr 2007 19:46 GMT
Francois Lionet wrote On 04/24/07 13:14,:
> Hello all,
>
[quoted text clipped - 6 lines]
> operator and findout what is wrong with my source code?
> Thanks in advance,

   In the Projects view, right-click your project and
open its Properties.  Expand the Build tree (if it isn't
already expanded) and click on Compiling.  Add all your
favorite javac options in the box in the right-hand side.
Click OK.  Recompile.

Signature

Eric.Sosman@sun.com

Lew - 25 Apr 2007 12:57 GMT
> Francois Lionet wrote On 04/24/07 13:14,:
>> Hello all,
[quoted text clipped - 3 lines]
>> unsafe operations." and I am told to recompile with the "-XLint:unchecked"
>> to know more.

There is no such option.  Do you mean the "-Xlint" option?

>> OK, but I cannot find where to put this operator,

It's not an operator, it's a command-line option to the javac compiler.

>> I have looked in the ant  file properties and no success.

It's not a file property, it's a command-line option to the javac compiler.

>> Can someone tell me where I can use this  operator and findout what is wrong with my source code?

You have mixed generic and raw types in your code.  Did you google for "Java
unhecked operations"?

You can either not mix raw types and generics, not always possible, or use
@SuppressWarnings to get rid of the message if you're doing it on purpose.
<http://mindprod.com/jgloss/annotations.html#SUPPRESSWARNINGS>

Signature

Lew



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.