End of support for Java 7 and earlier versions in Alibaba Cloud SDK for Java V1.0
Announcement
From January 1, 2025, Alibaba Cloud SDK for Java will no longer support the Java Development Kit (JDK) 6 runtime and the JDK 7 runtime. In other words, the support for Java 6 and Java 7 will officially end on that date. For more information about the SDK support policies, see Alibaba Cloud SDK support policies.
Alibaba Cloud SDK for Java is available in three versions: V1.0, V2.0, and Async. If you use Java 8 or a later version, you can use Alibaba Cloud SDK V1.0, V2.0, or Async. If you use Java 6 or 7, you can use only Alibaba Cloud SDK V1.0. End of support for Java 7 and earlier versions affect only Alibaba Cloud SDK V1.0.
In October 2017, Oracle ended support and maintenance for Java virtual machines (JVMs) running Java 6 or 7, and no longer provides extension updates and security updates. For more information about the end of life (EOL) timetable of all Java versions, see Oracle Java SE Support Roadmap. Alibaba Cloud will end maintenance and support for Alibaba Cloud SDK for Java 6 and Java 7 on January 1, 2025. After this date, if users who use Java 6 or 7 update Alibaba Cloud SDK for Java to a later version, they will receive an error message indicating Java version mismatch.
We recommend that you migrate the SDK to Java 8 or a later runtime. This ensures that you can receive updates and long-term support (LTS). We recommend that you use the LTS versions of Java, such as Java 8, Java 11, Java 17, and Java 21.
Alibaba Cloud SDK guarantees support for the latest LTS version of Java. For more information about the complete list of Java versions and their maintenance status, see Oracle Java SE Support Roadmap.
Why will Alibaba Cloud end support for Java 6 and 7?
As mentioned in the preceding section, Oracle ended support and maintenance for JVMs running Java 6 or 7, and no longer provides extension updates and security updates from October 2017.
Alibaba Cloud SDK for Java uses a small number of industry-standard dependencies. Many third-party libraries have stopped support for using Java 6 or 7 as the runtime and some third-party libraries no longer provide security updates for the Java 6 or 7 runtime due to the EOL of Java 6 or 7. This leads to security risks if users continue to use Java 6 or 7. To prevent these security risks, Alibaba Cloud decides to increase the minimum Java version for Alibaba Cloud SDK to Java 8.
What does end-of-support mean?
From the end-of-support date of each version, Alibaba Cloud SDK for Java will no longer apply security patches or support new features to the Java 6 or 7 runtime. In addition, Alibaba Cloud decides to increase the minimum Java version for Alibaba Cloud SDK to Java 8. If users who use Java 6 or 7 update Alibaba Cloud SDK for Java to a later version, they will receive an error message indicating Java version mismatch, as shown in the following sample error prompt:
$ java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
$ mvn package
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/aliyun/test/TestClass : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access\$100(URLClassLoader.java:71)
at java.net.URLClassLoader\$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader\$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at Main.main(Main.java:6)
Will the existing SDK for Java continue to operate?
Yes, the existing SDK for Java will continue to operate. However, we strongly recommend that you migrate the SDK to a supported runtime version so that you can continue to receive security patches and remain eligible for technical support.
What do I need to do?
If you are not ready to update to a later Java version, you can fix the version of Alibaba Cloud SDK for Java to a version that supports Java 6. This version will continue to operate. However, you will no longer receive new service updates, bug fixes, or security fixes.
We recommend that you update the runtime to Java 8 or later. If you use Maven to manage your project, perform the following steps:
1. Confirm and update the current Java version.
Check whether you have an appropriate version of Java installed on your system.
If not, install Java 8 or a later version.
2. Configure Maven to use a specific JDK.
You can modify the settings.xml file of Maven to specify the JDK to use.
<profile>
<id>my-jdk-1.8-profile</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
3. Specify the Java version in the pom.xml file of your project.
Make sure that the required Java version is configured for your Maven project. Modify the following parameters in the pom.xml file:
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.release>1.8</maven.compiler.release>
</properties>
SDK for Java version maintenance matrix
For more information about the maintenance and end-of-support for Alibaba Cloud SDK, see Alibaba Cloud SDK support policies. Alibaba Cloud provides support for SDK dependencies for at least six months after the community or vendor ends support for the dependencies. This policy may vary depending on the dependency. For most dependencies, the period is about one year.
The following table describes the end-of-support dates for Java versions in Alibaba Cloud SDK for Java.
Java version | Java end-of-support time | Alibaba Cloud SDK end-of-support date |
Java 6 | October 2017 | January 1, 2025 |
Java 7 | October 2017 | January 1, 2025 |
Java 8 | Scheduled in December 2030 | Scheduled on January 1, 2032 |
Java 11 | Scheduled in January 2032 | Scheduled on January 1, 2034 |
Java 17 | Scheduled in September 2029 | Scheduled on January 1, 2031 |
Java 21 | Scheduled in September 2031 | Scheduled on January 1, 2033 |
Java 25 | Scheduled in September 2033 | Scheduled on January 1, 2035 |
What if I need extra help?
If you have any questions, submit your feedback in OpenAPI Portal or contact us by joining the DingTalk group (ID 60965016010).