• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

compile unchecked

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello

I have read in the K/B book about using generic combined with non-generic code, that we will get a warning not very descriptive, but if we compile with "xlint:unchecked" we will get a more specific warning.
Can someone tell me how can I compile in this way ? I am using the Eclipse IDE.

thank you.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eclipse has its own built-in Java compiler (it doesn't use javac), so you can't use -Xlint:unchecked.

In Eclipse, you can select which warnings and errors you want to see by choosing the menu option Window / Preferences, and then going to Java / Compiler / Errors/Warnings.

On the command line, just do exactly what the message tells you; add the option -Xlint:unchecked to the command:

javac -Xlint:unchecked MyClass.java
 
My, my, aren't you a big fella. Here, have a tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic