diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java index 957fe5379d..e39ae54cd3 100644 --- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java +++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2025 IBM Corporation and others. + * Copyright (c) 2008, 2026 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -234,6 +234,8 @@ public static String getCompilerCompliance(IVMInstall2 vMInstall) { String version = vMInstall.getJavaVersion(); if (version == null) { return null; + } else if (matchesMajorVersion(version, JavaCore.VERSION_28)) { + return JavaCore.VERSION_28; } else if (matchesMajorVersion(version, JavaCore.VERSION_27)) { return JavaCore.VERSION_27; } else if (matchesMajorVersion(version, JavaCore.VERSION_26)) { diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java index 6b23355226..deb8643113 100644 --- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java +++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2025 IBM Corporation and others. + * Copyright (c) 2000, 2026 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -808,7 +808,10 @@ public URL getDefaultJavadocLocation(File installLocation) { */ public static URL getDefaultJavadocLocation(String version) { try { - if (version.startsWith(JavaCore.VERSION_27)) { + if (version.startsWith(JavaCore.VERSION_28)) { + // Java 28 docs aren't published yet + return new URI("https://docs.oracle.com/en/java/javase/26/docs/api/").toURL(); //$NON-NLS-1$ + } else if (version.startsWith(JavaCore.VERSION_27)) { // Java 27 docs aren't published yet return new URI("https://docs.oracle.com/en/java/javase/26/docs/api/").toURL(); //$NON-NLS-1$ } else if (version.startsWith(JavaCore.VERSION_26)) { diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java index a7d504efe4..42a73ef947 100644 --- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java +++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2025 IBM Corporation and others. + * Copyright (c) 2006, 2026 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -41,6 +41,7 @@ public class ExecutionEnvironmentAnalyzer implements IExecutionEnvironmentAnalyz // XXX: Note that this string is not yet standardized by OSGi, see http://wiki.osgi.org/wiki/Execution_Environment + private static final String JavaSE_28 = "JavaSE-28"; //$NON-NLS-1$ private static final String JavaSE_27 = "JavaSE-27"; //$NON-NLS-1$ private static final String JavaSE_26 = "JavaSE-26"; //$NON-NLS-1$ private static final String JavaSE_25 = "JavaSE-25"; //$NON-NLS-1$ @@ -119,6 +120,7 @@ public class ExecutionEnvironmentAnalyzer implements IExecutionEnvironmentAnalyz mappings.put(JavaSE_25, new String[] { JavaSE_24 }); mappings.put(JavaSE_26, new String[] { JavaSE_25 }); mappings.put(JavaSE_27, new String[] { JavaSE_26 }); + mappings.put(JavaSE_28, new String[] { JavaSE_28 }); } @Override public CompatibleEnvironment[] analyze(IVMInstall vm, IProgressMonitor monitor) throws CoreException { @@ -144,7 +146,9 @@ public CompatibleEnvironment[] analyze(IVMInstall vm, IProgressMonitor monitor) types = getTypes(CDC_FOUNDATION_1_1); } } else { - if (javaVersion.startsWith("27")) { //$NON-NLS-1$ + if (javaVersion.startsWith("28")) { //$NON-NLS-1$ + types = getTypes(JavaSE_28); + } else if (javaVersion.startsWith("27")) { //$NON-NLS-1$ types = getTypes(JavaSE_27); } else if (javaVersion.startsWith("26")) { //$NON-NLS-1$ types = getTypes(JavaSE_26); diff --git a/org.eclipse.jdt.launching/plugin.properties b/org.eclipse.jdt.launching/plugin.properties index 949f5f4b4b..8a5a684067 100644 --- a/org.eclipse.jdt.launching/plugin.properties +++ b/org.eclipse.jdt.launching/plugin.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2000, 2025 IBM Corporation and others. +# Copyright (c) 2000, 2026 IBM Corporation and others. # # This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 @@ -89,6 +89,7 @@ environment.description.28 = Java Platform, Standard Edition 24 environment.description.29 = Java Platform, Standard Edition 25 environment.description.30 = Java Platform, Standard Edition 26 environment.description.31 = Java Platform, Standard Edition 27 +environment.description.32 = Java Platform, Standard Edition 28 classpathVariableInitializer.deprecated = Use the JRE System Library instead diff --git a/org.eclipse.jdt.launching/plugin.xml b/org.eclipse.jdt.launching/plugin.xml index f95395db6c..73d31878fd 100644 --- a/org.eclipse.jdt.launching/plugin.xml +++ b/org.eclipse.jdt.launching/plugin.xml @@ -1,7 +1,7 @@