Hi, I'm using Eclipse. I was using Java 1.4, and now trying to use Java 5. I have a project which I compiled and run under Java 1.4. After installing Java 5, I can re-compile and re-run the same project on eclipse with no problems. However, when I try to compile, make jar, and make zip with Ant, I get the following messages. Anyway, jar and zip files work normally. Here are the messages:
java: [mkdir] Created dir: C:\eclipse\workspace\belletmen\build\classes [javac] Compiling 21 source files to C:\eclipse\workspace\belletmen\build\classes [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [copy] Copied 6 empty directories to 5 empty directories under C:\eclipse\workspace\belletmen\build
I can't find which files are are using "unchecked" or "unsafe" operations. What should I do? Thanks. Ahmet Aksoy
As EFH says, these are warnings not errors. They have to do with using classes from the API that have been re-written to take advantage of the new generics feature. This is most common when using the Collections Framework. If this is production code, you should probably not worry much about this too much at the moment. Eventually, you will want to modify your code to use the extra compile-time type-checking that generics provide. If you follow the directions by using the given compiler flag, you can find out which lines of code are directly effected. However, changing those lines will invariable break things else where. This is why I recommend that you take porting to JDK 1.5 in baby steps in production code.