You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Quick Start
12
12
============
13
13
1. Install the Extension
14
14
2. If you do not have a _Java_ Development Kit correctly [set](#setting-the-jdk)
15
-
* Download and install a Java Development Kit for your project (Java 1.5 or above is supported)
15
+
* Download and install a Java Development Kit for your project (Java 1.5 or above is supported)
16
16
3. Extension is activated when you first access a Java file
17
17
* Recognizes projects with *Maven* or *Gradle* build files in the directory hierarchy.
18
18
@@ -60,7 +60,7 @@ The following part is only kept for the universal version without embedded JRE.
60
60
61
61
>The tooling JDK will be used to launch the Language Server for Java. And by default, will also be used to compile your projects.\
62
62
\
63
-
The path to the Java Development Kit can be specified by the `java.home` setting in VS Code settings (workspace/user settings). If not specified, it is searched in the following order until a JDK meets current minimum requirement.
63
+
The path to the Java Development Kit can be specified by the `java.jdt.ls.java.home` setting in VS Code settings (workspace/user settings). If not specified, it is searched in the following order until a JDK meets current minimum requirement.
64
64
>- the `JDK_HOME` environment variable
65
65
>- the `JAVA_HOME` environment variable
66
66
>- on the current system path
@@ -110,7 +110,7 @@ Supported VS Code settings
110
110
==========================
111
111
The following settings are supported:
112
112
113
-
*`java.home` : **Deprecated, only used for universal version without embedded JRE.** Absolute path to JDK home folder used to launch the Java Language Server. Requires VS Code restart.
113
+
*`java.home` : **Deprecated, please use 'java.jdt.ls.java.home' instead.** Absolute path to JDK home folder used to launch the Java Language Server. Requires VS Code restart.
114
114
*`java.jdt.ls.vmargs` : Extra VM arguments used to launch the Java Language Server. Requires VS Code restart.
115
115
*`java.errors.incompleteClasspath.severity` : Specifies the severity of the message when the classpath is incomplete for a Java file. Supported values are `ignore`, `info`, `warning`, `error`.
116
116
*`java.trace.server` : Traces the communication between VS Code and the Java language server.
@@ -196,12 +196,12 @@ The following settings are supported:
196
196
-`lastMember`: Insert the generated code as the last member of the target type.
197
197
*`java.settings.url` : Specifies the url or file path to the workspace Java settings. See [Setting Global Preferences](https://github.com/redhat-developer/vscode-java/wiki/Settings-Global-Preferences)
198
198
*`java.symbols.includeSourceMethodDeclarations` : Include method declarations from source files in symbol search. Defaults to `false`.
199
-
200
-
New in 1.1.0:
201
199
*`java.quickfix.showAt` : Show quickfixes at the problem or line level.
202
200
*`java.configuration.workspaceCacheLimit` : The number of days (if enabled) to keep unused workspace cache data. Beyond this limit, cached workspace data may be removed.
203
201
*`java.import.generatesMetadataFilesAtProjectRoot` : Specify whether the project metadata files(.project, .classpath, .factorypath, .settings/) will be generated at the project root. Defaults to `false`.
204
202
203
+
New in 1.3.0:
204
+
*`java.jdt.ls.java.home`: Absolute path to JDK home folder used to launch the Java Language Server. This setting will replace the Java extension's embedded JRE to start the Java Language Server. Requires VS Code restart.
Copy file name to clipboardExpand all lines: package.json
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@
14
14
"untrustedWorkspaces": {
15
15
"supported": "limited",
16
16
"restrictedConfigurations": [
17
+
"java.jdt.ls.java.home",
17
18
"java.home",
18
19
"java.jdt.ls.vmargs"
19
20
]
@@ -171,7 +172,16 @@
171
172
"default": null,
172
173
"description": "Specifies the folder path to the JDK (11 or more recent) used to launch the Java Language Server.\nOn Windows, backslashes must be escaped, i.e.\n\"java.home\":\"C:\\\\Program Files\\\\Java\\\\jdk11.0_8\"",
173
174
"scope": "machine-overridable",
174
-
"deprecationMessage": "This setting will be deprecated, please use the environment variable 'JAVA_HOME' instead."
175
+
"deprecationMessage": "This setting is deprecated, please use 'java.jdt.ls.java.home' instead."
176
+
},
177
+
"java.jdt.ls.java.home": {
178
+
"type": [
179
+
"string",
180
+
"null"
181
+
],
182
+
"default": null,
183
+
"description": "Specifies the folder path to the JDK (11 or more recent) used to launch the Java Language Server. This setting will replace the Java extension's embedded JRE to start the Java Language Server. \n\nOn Windows, backslashes must be escaped, i.e.\n\"java.jdt.ls.java.home\":\"C:\\\\Program Files\\\\Java\\\\jdk11.0_8\"",
logger.info("Use the JDK from 'java.configuration.runtimes' as the initial default project JDK.");
92
-
}else{
93
-
openJDKDownload(reject,"Please download and install a JDK to compile your project. You can configure your projects with different JDKs by the setting ['java.configuration.runtimes'](https://github.com/redhat-developer/vscode-java/wiki/JDK-Requirements#java.configuration.runtimes)");
logger.info("Use the JDK from 'java.configuration.runtimes' as the initial default project JDK.");
93
+
}else{
94
+
openJDKDownload(reject,"Please download and install a JDK to compile your project. You can configure your projects with different JDKs by the setting ['java.configuration.runtimes'](https://github.com/redhat-developer/vscode-java/wiki/JDK-Requirements#java.configuration.runtimes)");
// For universal version, we still require users to install a qualified JDK to run Java extension.
100
99
openJDKDownload(reject,`Java ${REQUIRED_JDK_VERSION} or more recent is required to run the Java extension. Please download and install a recent JDK. You can still compile your projects with older JDKs by configuring ['java.configuration.runtimes'](https://github.com/redhat-developer/vscode-java/wiki/JDK-Requirements#java.configuration.runtimes)`);
awaitwindow.showErrorMessage(`Security Warning! Do you allow this workspace to set the java.home variable? \n java.home: ${javaHome}`,disallow,allow).then(asyncselection=>{
144
+
awaitwindow.showErrorMessage(`Security Warning! Do you allow this workspace to set the java.jdt.ls.java.home variable? \n java.jdt.ls.java.home: ${javaHome}`,disallow,allow).then(asyncselection=>{
awaitwindow.showErrorMessage(`Security Warning! Do you allow this workspace to set the java.home variable? \n java.home: ${javaHome}`,disallow,allow).then(asyncselection=>{
0 commit comments