javawindowseclipsejava-6

JAVA 1.6 in Eclipse IDE


I am unable to change the compiler to Java SE 1.6 in Eclipse as the option is not shown in the change compiler menu. When I try to look for it in the compiler options, it cannot be found:
Java 1.6 not showing in compiler options

When I select it from the "Execution Environments", the application just closes automatically and the compiler still shows 23.


Solution

  • Java 6 has been released in 2006, there are no public updates for these JDKs any more and people aren't really using it any more. Even javac only supports compiling Java 8 or higher with more recent JDKs. If someone is still using JDK 6 in production, they should (probably) have updated years ago.

    This resulted in Eclipse dropping support for compiling for Java 7 and below in Eclipse 2024-09. You can find the release notes here.

    When writing Java code, you likely want to use the latest LTS version which is 21 at the moment unless you have a very good reason to use an older version. If you want to use Java 8 for example, you can still do that with the latest Eclipse versions.

    If you really want to write code for Java 6, you can use Eclipse 2024-06.