Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/requirements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import * as expandHomeDir from 'expand-home-dir';
import * as fse from 'fs-extra';
import { getRuntime, getSources, JAVAC_FILENAME, JAVA_FILENAME } from 'jdk-utils';
import { getRuntime, getSources, JAVA_FILENAME, JAVAC_FILENAME } from 'jdk-utils';
import * as path from 'path';
import { env, ExtensionContext, Uri, window, workspace } from 'vscode';
import { Commands } from './commands';
import { listJdks, sortJdksBySource, sortJdksByVersion } from './jdkUtils';
import { logger } from './log';
import { checkJavaPreferences } from './settings';
import { listJdks, sortJdksBySource, sortJdksByVersion } from './jdkUtils';
import { getJavaConfiguration } from './utils';

/* eslint-disable @typescript-eslint/naming-convention */
Expand Down Expand Up @@ -41,7 +41,7 @@ export async function resolveRequirements(context: ExtensionContext): Promise<Re
const preferenceName = javaPreferences.preference;
let javaHome = javaPreferences.javaHome;
let javaVersion: number = 0;
const REQUIRED_JDK_VERSION = ('on' === getJavaConfiguration().get('jdt.ls.javac.enabled'))?25:21;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way https://github.com/redhat-developer/vscode-java/wiki/Javac%E2%80%90based-compilation-support currently says 24 is required; should that say 25?

const REQUIRED_JDK_VERSION = ('on' === getJavaConfiguration().get('jdt.ls.javac.enabled')) ? 26 : 21;
if (toolingJreVersion < REQUIRED_JDK_VERSION) { // embedded tooling JRE doesn't meet requirement
toolingJre = null;
toolingJreVersion = 0;
Expand Down
Loading