David Newton wrote:(Is there a reason you won't just compile with 1.5? Personally I think the possible headaches of delivering something they can't run aren't worth it.)
I have one. Java 6 is my installed JVM for Eclipse, but I was running apps using Apache OpenJPA, which at the time required Java 5 settings. I just overrode the project settings on the projects of interest to target Java 5.
Customer surveys are for companies who didn't pay proper attention to begin with.
the reason is - i often like to get into java sources or use some new features (ones that appeared in 6.0).
then i can look into the new features, learn them, etc etc. i don't want to be behind ;)
compiler will allow for this, but at runtime i will get my ass kicked.
if i have to stick to 5.0 - i just don't see the new 6.0 stuff.
why do i have to stick to 5.0 - because this is how we do at work and i have to obey these rules.
Tim - any idea how to do it in a regular case? just plain applications (like one file and a main method)? or when i run them on Tomcat?
Unless you work in an enlightened shop or happen to be one of the fortunate few who are allowed liberties, you're better off leaving Java 6 on your home computer. And if your shop isn't at least looking at Java 6 at this point, it's a good idea the keep the old CV polished up.
When you pick source and object compatibility levels in Eclipse, they apply to the entire project. You can include components compiled under Java 5, 1.4, or whatever in a Java 6 project, of course, but anything you compile yourself will be done according to the rules of that project. In order to do otherwise, you'd have to create the exceptional components in some other project that had a different Java version setting and import them.
To tell you the truth, I don't really notice much difference between Java 5 and Java 6, and I do a lot of bouncing back and forth. The only thing I can recall without RTFM'ing is that Java6 handles annotation processing better, but I only do annotation stuff about once a year. Then again, I'm not using Java 6 features just because I can - only because I need to.