Dan McGinn-Combs wrote:Is there a compile option that will allow me to use the 1.6 compiler to generate code for a 1.4.2 server?
Use the
-source 1.4 and
-target 1.4 compiler flags, and make sure that you do not use any class, method or field that was added in Java 5.0 or beyond. If you use any of those you'll get a NoClassDefFoundError, NoSuchMethodError or NoSuchFieldError during runtime.
If you use Eclipse and have some old 1.4 JRE installed you can setup the 1.4 JRE inside Eclipse and use that for the project; that will help you prevent the usage of newer features. You can also set the compiler version to 1.4 from Eclipse.
Netbeans probably has similar features but I haven't used Netbeans so I couldn't confirm this.