Good points. Neal Gafter wrote: > The @Since solution only works for some kinds of changes. For > example, it does not work for changes to the inheritance hierarchy > (like the insertion of new base classes or interfaces) or > generification of previously non-generic APIs. It's also subject to > error and very difficult to test to ensure that a later version of the > JDK properly compiles all programs for an earlier version. Really, > that effort is better spent elsewhere. > > On Oct 6, 5:48 pm, Jess Holle <je...@ptc.com> wrote: > >> There really *should* be a way to set the equivalent of "libraryLevel" >> to JDK 5 without having to separately install Java 5. >> >> Essentially this would mean elevating @since to be compile-time visible >> and making javac ignore things that it was not supposed to see. >> >> Compared to the mess that is bootclasspath this would be *much* more usable. >> >> By the time one might use bootclasspath one might as well just stick >> with an old JDK -- it's less hassle. Except in NetBeans where is is >> really hard to separate the JDK the IDE runs with from the JDK used for >> compilation, but that's a NetBeans issue that should just be fixed there >> -- or better yet fixed via a -libraryLevel or some such flag. >> >> -- >> Jess Holle >> >> jddarcy wrote: >> >>> During episode #281, Carl described some issues with cross compiling >>> from a JDK 6 install (on a Mac in this case) to run on JDK 5. The >>> javac man page documents how to do this; in brief the -target has to >>> be set to the older version and the bootclasspath for compiling must >>> point to a rt.jar from the older JDK too: >>> >>> http://java.sun.com/javase/6/docs/technotes/tools/solaris/javac.html#... >>> >>> If the bootclasspath is not set, while the resulting class files may >>> work, differences in method resolution could cause use of methods not >>> present in the older release: >>> http://blogs.sun.com/darcy/entry/how_to_cross_compile_for >>> >>> > > >
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to javaposse+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---