Skip to content

Commit d23e4cd

Browse files
committed
Check JDK for javac
1 parent 4f862f5 commit d23e4cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/requirements.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
import * as expandHomeDir from 'expand-home-dir';
44
import * as fse from 'fs-extra';
5-
import { getRuntime, getSources, JAVAC_FILENAME, JAVA_FILENAME } from 'jdk-utils';
5+
import { getRuntime, getSources, JAVA_FILENAME, JAVAC_FILENAME } from 'jdk-utils';
66
import * as path from 'path';
77
import { env, ExtensionContext, Uri, window, workspace } from 'vscode';
88
import { Commands } from './commands';
9+
import { listJdks, sortJdksBySource, sortJdksByVersion } from './jdkUtils';
910
import { logger } from './log';
1011
import { checkJavaPreferences } from './settings';
11-
import { listJdks, sortJdksBySource, sortJdksByVersion } from './jdkUtils';
1212
import { getJavaConfiguration } from './utils';
1313

1414
/* eslint-disable @typescript-eslint/naming-convention */
@@ -41,7 +41,7 @@ export async function resolveRequirements(context: ExtensionContext): Promise<Re
4141
const preferenceName = javaPreferences.preference;
4242
let javaHome = javaPreferences.javaHome;
4343
let javaVersion: number = 0;
44-
const REQUIRED_JDK_VERSION = ('on' === getJavaConfiguration().get('jdt.ls.javac.enabled'))?25:21;
44+
const REQUIRED_JDK_VERSION = ('on' === getJavaConfiguration().get('jdt.ls.javac.enabled')) ? 26 : 21;
4545
if (toolingJreVersion < REQUIRED_JDK_VERSION) { // embedded tooling JRE doesn't meet requirement
4646
toolingJre = null;
4747
toolingJreVersion = 0;

0 commit comments

Comments
 (0)