diff --git a/src/com/sun/tools/jmake/ClassFileReader.java b/src/com/sun/tools/jmake/ClassFileReader.java index aa7c3d5..e1cff84 100644 --- a/src/com/sun/tools/jmake/ClassFileReader.java +++ b/src/com/sun/tools/jmake/ClassFileReader.java @@ -26,6 +26,7 @@ public class ClassFileReader extends BinaryFileReader { public static final int JDK14_MAJOR_VERSION = 48; public static final int JDK15_MAJOR_VERSION = 49; public static final int JDK16_MAJOR_VERSION = 50; + public static final int JDK17_MAJOR_VERSION = 51; public static final int CONSTANT_Utf8 = 1; public static final int CONSTANT_Unicode = 2; public static final int CONSTANT_Integer = 3; @@ -71,7 +72,9 @@ private void readPreamble() { if (majorVersion > JDK14_MAJOR_VERSION || versionWord(majorVersion, minorVersion) < versionWord(JAVA_MIN_MAJOR_VERSION, JAVA_MIN_MINOR_VERSION) ) { - if (majorVersion == JDK16_MAJOR_VERSION) { + if (majorVersion == JDK17_MAJOR_VERSION) { + classInfo.javacTargetRelease = Utils.JAVAC_TARGET_RELEASE_17; + } else if (majorVersion == JDK16_MAJOR_VERSION) { classInfo.javacTargetRelease = Utils.JAVAC_TARGET_RELEASE_16; } else if (majorVersion == JDK15_MAJOR_VERSION) { classInfo.javacTargetRelease = Utils.JAVAC_TARGET_RELEASE_15; diff --git a/src/com/sun/tools/jmake/Utils.java b/src/com/sun/tools/jmake/Utils.java index cb660ad..6aa1f07 100644 --- a/src/com/sun/tools/jmake/Utils.java +++ b/src/com/sun/tools/jmake/Utils.java @@ -6,15 +6,14 @@ */ package com.sun.tools.jmake; -import java.util.zip.ZipFile; -import java.util.zip.ZipEntry; - -import java.io.PrintStream; import java.io.File; +import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.io.FileInputStream; +import java.io.PrintStream; +import java.util.zip.ZipEntry; +import java.util.zip.ZipFile; /** * Utility functions used by other classes from this package. @@ -34,6 +33,7 @@ public class Utils { static final int JAVAC_TARGET_RELEASE_OLDEST = 0x01040000; // 1.4 and previous versions static final int JAVAC_TARGET_RELEASE_15 = 0x01050000; // if class is compiled with -target 1.5 static final int JAVAC_TARGET_RELEASE_16 = 0x01060000; // if class is compiled with -target 1.6 + static final int JAVAC_TARGET_RELEASE_17 = 0x01070000; // if class is compiled with -target 1.7 static int warningLimit = 20; // Maximum number of warnings to print static final int TIMING_TOTAL = 0; static final int TIMING_PDBREAD = 1;