aspose file tools*
The moose likes Beginning Java and the fly likes JDK 5.0 install issue! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JDK 5.0 install issue!" Watch "JDK 5.0 install issue!" New topic
Author

JDK 5.0 install issue!

Robert Bonslater
Greenhorn

Joined: Jan 30, 2005
Posts: 28
I'm getting ready to use Professional Java JDK 5 but I'm getting an error when upgrading from jdk 1.4 to jdk 1.5. When I try to compile code, I get:

Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

But when I compile using "javac -source 1.4 jakarta-tomcat-5......"
it works. Obviously it is not finding the new version of jre 1.5 and still using the previous 1.4. How can I solve this problem?

Thank you.
David Harkness
Ranch Hand

Joined: Aug 07, 2003
Posts: 1646
This isn't an error; it's a warning. One cause is using any of the Collections classes without specifying their contained type (generics).
Robert Bonslater
Greenhorn

Joined: Jan 30, 2005
Posts: 28
Thank you for your reply!

Could you please specify what this would require me to do? What do you mean by specify Collections classes contained type (generic)? I'm not catching on.
David Harkness
Ranch Hand

Joined: Aug 07, 2003
Posts: 1646
JDK 5.0 introduced generics, a form of class typing similar to C++'s templates. When you declare a Collection, you can specify the types of objects it can contain.If you'd like to see all the warnings, you can useas the note says.
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
At least your compiler is the right version as this warning is generated only by 1.5.0 (and up).
If you try to run the generated classes and you get an error about incorrect classfile version numbers you need to make sure you don't have an old 1.4 java and/or javaw executable being found on your system path before the 1.5 version is found (can happen on some systems).


42
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDK 5.0 install issue!