0

While I understand that as a user, it is very important to upgrade to java 7 update 11. For development, are there advantages to using jdk6 for new projects? I understand that there are new features to java 7, especially nio-2, so there are advantages to using java 7, but are there advantages to sticking with jdk6?

Alex
  • 1,470
  • 1
  • 11
  • 28
  • 1
    You should take a look at following link. [Java SE 7 Features and Enhancements](http://www.oracle.com/technetwork/java/javase/jdk7-relnotes-418459.html) – Smit Jan 14 '13 at 19:09
  • There are a few cool things like integrated JavaFX, `java.nio.*`, elliptic curve crypto libraries, multicatch expressions, ... but I can't see any revolutionary changes if you don't need any of the above. (But maybe I just have not come across them yet?) – us2012 Jan 14 '13 at 19:11
  • Yes, there are many changes in JDK7, [start reading here](http://www.oracle.com/technetwork/java/javase/jdk7-relnotes-418459.html) – Gereon Jan 14 '13 at 19:11
  • Stating feature enhancements of `JDK7` is not the answer to the question. You might be on the right track... – blo0p3r Jan 14 '13 at 19:24

2 Answers2

3

New versions of the JDK always come with features that contribute to ease of development and the maturity of the language as a whole.

Read more here

It is usually recommended that you use the latest version for new projects unless, you are restricted by your company or any other constrain. From my experience, companies might restrict their employees to use a certain version of Java due to stability issues, as well as having to deal with legacy code written specifically with an older version and so on, they might also have limiting factors in case the operating environment is also restricted.

Waleed Almadanat
  • 1,027
  • 10
  • 24
2

Choosing the JDK version you want to compile at is really the better question; which is what I think you are asking. In general, if you can develop your application using APIs available in earlier JDKs, that means users with a JDK that isn't as up to date can use your application. The JDK compiler level you specify sets the minimum version required to run your application.

Obviously, there are benefits to compiling at a higher level JDK, as you now have more APIs available for you to use.

EDIT: Just to note, in something like Eclipse, this is specified by setting the compiler compliance level for a project (or workspace).

Marc Baumbach
  • 10,323
  • 2
  • 30
  • 45
  • http://stackoverflow.com/questions/3050219/jdk-1-6-compatible-with-jdk-1-5 contains information about setting the target compliance level of the compiler. – Marc Baumbach Jan 14 '13 at 19:26