views:

538

answers:

2

This question has always bothered me. And the NetBeans wiki does not say anything about that... Besides, JDK 1.5 will complete the End of Life process very soon and 1.6 has been around for quite a while.

So why do they still use version 1.5 even if 1.6 is available on all Netbeans-supported platforms?

A: 

I've only used Netbeans a few times, but I know you can download Netbeans 6.7 with the latest version of the Java SE 6 SDK (6u14).

Unless you meant with the Java EE 5 SDK. J2EE 5 is just a specification, implemented by Sun's GlassFish stack, Jetty, Apache Geronimo (and partly by Apache Tomcat), etc...

Sun's Java EE 5 SDK is just the Java SE 6 SDK with the GlassFish application server and other optional downloads that implement other parts of the specification.

R. Bemrose
I'm sorry if I misled you, but what I actually meant was compiling netbeans, not compiling projects in netbeans!
jeshan
Oh, OK. The question makes more sense now.
R. Bemrose
+1  A: 

The NetBeans team requires JDK 1.5 to ensure that the resulting jars will run on a 1.5 JVM.

You don't need to build it with JDK 1.5 if it's just for your own use. But if you're planning on developing modules, you'll need to use 1.5 to ensure everyone else can use your modules.

If you compile with 1.6, you can use the -target 1.5 to generate classes that will load into a 1.5 JVM. The downside is it will not prevent you from using classes or methods introduced in 1.6 (eg: StringBuilder). It will load in a 1.5 JVM, but will fail with the likes of ClassNotFoundException, NoSuchMethodErrot, or NoSuchFieldError.

Devon_C_Miller
i know that they want it to run on jre 1.5.. but why? We have jdk6 on all supported platforms...
jeshan
JDK 1.6 is available for all platforms, but not everyone is free to update as they choose. I have customers who are still running 1.4.2. Their system are under a company-wide configuration management system. They're working on updating to 1.6, but it will likely be another 6 months before they roll it out. But, until they do I can't use any 1.5 or later functionality.
Devon_C_Miller