This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Problems with Compiling Generics. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Problems with Compiling Generics." Watch "Problems with Compiling Generics." New topic
Author

Problems with Compiling Generics.

Suresh Rajadurai
Ranch Hand

Joined: Feb 22, 2007
Posts: 58
Hi Folks,

when I tried to compile the following code with

javac test.java

it gives the following message in the dos prompt:

Note: test.java used unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.



Then when I compiled with the following command:

javac -Xlint:unchecked test.java

it gives the following error messages:

javac: invalid flag: -xlint:unchecked
Usage: javac <options> <sourcefiles>
use -help for a list of possible options.



Could you guys PLEASE throw me some light on this annoying messages PLEASE.




Thanks & regards

Suresh.
Piet Verdriet
Ranch Hand

Joined: Feb 25, 2006
Posts: 266
Strange, when compiling your code like this:

I get the following message:

It looks like you compiled your source file with two different compilers... Anyway, you should replace your line:

by:

to make the warning disappear.
Suresh Rajadurai
Ranch Hand

Joined: Feb 22, 2007
Posts: 58
Thank you.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Problems with Compiling Generics.
 
Similar Threads
cannot find symbol - compiler error?
Conversion of Arrays to List - code causing compiler error
warnings going from 1.4.2 to 5.0
enthuware error?
cannot find symbol - compiler error?