Skip to content

Commit

Permalink
Force minimum jdk to Java 17 (#538)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThadHouse authored Oct 22, 2022
1 parent 8b5ce4e commit a107f97
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This repository contains the WPILib VS Code extension, along with the standalone

## Build Dependencies
* Node JS - Tested with Node 8.
* Java - Tested with Java 11
* Java - Tested with Java 17
* VS Code - For development/debugging.
* TS Lint Extension
* Chrome Debug Extension
Expand Down
2 changes: 1 addition & 1 deletion vscode-wpilib/locale/zh-cn/message.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Java 11 required, but not found. Might have compilation errors.: 没有找到需要的 Java 11,可能会产生编译错误。
Java 17 required, but not found. Might have compilation errors.: 没有找到需要的 Java 17,可能会产生编译错误。
# This project is not compatible with this version of the extension. Please create a new project.
# It is recommended to run a "Build" after a WPILib update to ensure dependencies are installed correctly. Would you like to do this now?
# It is recommended to run a "Build" and update tools after a WPILib update to ensure dependencies are installed correctly. Would you like to do this now?
Expand Down
2 changes: 1 addition & 1 deletion vscode-wpilib/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ async function handleAfterTrusted(externalApi: ExternalAPI, context: vscode.Exte
}
setJavaHome(jdkLoc);
} else {
vscode.window.showErrorMessage(i18n('message', 'Java 11 required, but not found. Might have compilation errors.'));
vscode.window.showErrorMessage(i18n('message', 'Java 17 required, but not found. Might have compilation errors.'));
}

// Activate the C++ parts of the extension
Expand Down
4 changes: 2 additions & 2 deletions vscode-wpilib/src/jdkdetector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export async function findJdkPath(api: IExternalAPI): Promise<string | undefined
if (vscodeJavaHome) {
try {
const javaVersion = await getJavaVersion(vscodeJavaHome);
if (javaVersion >= 11) {
if (javaVersion >= 17) {
logger.log(`Found Java Home Version: ${javaVersion} at ${vscodeJavaHome}`);
return vscodeJavaHome;
} else {
Expand All @@ -60,7 +60,7 @@ export async function findJdkPath(api: IExternalAPI): Promise<string | undefined
const frcHomeJava = path.join(frcHome, 'jdk');
try {
const javaVersion = await getJavaVersion(frcHomeJava);
if (javaVersion >= 11) {
if (javaVersion >= 17) {
logger.log(`Found Java Home Version: ${javaVersion} at ${frcHomeJava}`);
return frcHomeJava;
} else {
Expand Down

0 comments on commit a107f97

Please sign in to comment.