Skip to content

Commit

Permalink
Add Java 23 constants
Browse files Browse the repository at this point in the history
They are added for runtime detection and launching of Java 23 as
detected in eclipse-pde/eclipse.pde#1227 and
eclipse-jdt/eclipse.jdt.debug#426 .
  • Loading branch information
akurtakov authored and iloveeclipse committed Apr 15, 2024
1 parent b52f731 commit a68092e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ public interface ClassFileConstants {
int MAJOR_VERSION_20 = 64;
int MAJOR_VERSION_21 = 65;
int MAJOR_VERSION_22 = 66;
int MAJOR_VERSION_23 = 67;

int MAJOR_VERSION_0 = 44;
int MAJOR_LATEST_VERSION = MAJOR_VERSION_22;
Expand Down Expand Up @@ -174,6 +175,7 @@ public interface ClassFileConstants {
long JDK20 = ((long)ClassFileConstants.MAJOR_VERSION_20 << 16) + ClassFileConstants.MINOR_VERSION_0;
long JDK21 = ((long)ClassFileConstants.MAJOR_VERSION_21 << 16) + ClassFileConstants.MINOR_VERSION_0;
long JDK22 = ((long)ClassFileConstants.MAJOR_VERSION_22 << 16) + ClassFileConstants.MINOR_VERSION_0;
long JDK23 = ((long)ClassFileConstants.MAJOR_VERSION_23 << 16) + ClassFileConstants.MINOR_VERSION_0;

public static long getLatestJDKLevel() {
return ((long)ClassFileConstants.MAJOR_LATEST_VERSION << 16) + ClassFileConstants.MINOR_VERSION_0;
Expand Down
6 changes: 6 additions & 0 deletions org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -3310,6 +3310,12 @@ public final class JavaCore extends Plugin {
* @category OptionValue
*/
public static final String VERSION_22 = "22"; //$NON-NLS-1$
/**
* Configurable option value: {@value}.
* @since 3.38
* @category OptionValue
*/
public static final String VERSION_23 = "23"; //$NON-NLS-1$
/**
* Configurable option value: {@value}.
* @since 3.4
Expand Down

0 comments on commit a68092e

Please sign in to comment.