-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JRE support #136
JRE support #136
Conversation
Only JDK is supported. Generally users who don't develop with Java, have an installed JRE not a JDK. I think javac is used here because it was a copy/paste from jdt ls code which requires JDK. This very simple PR checks if java exists and javac. But it requires to declare the JRE with java.home. It should be improved to find JRE like we have that with JDK.
We need to introduce a vscode-xml specific java.home variable, maybe |
@@ -54,7 +54,7 @@ function checkJavaRuntime(): Promise<string> { | |||
if(!pathExists.sync(javaHome)){ | |||
openJDKDownload(reject, source+' points to a missing folder'); | |||
} | |||
if(!pathExists.sync(path.resolve(javaHome, 'bin', JAVAC_FILENAME))){ | |||
if(!pathExists.sync(path.resolve(javaHome, 'bin', JAVA_FILENAME))){ | |||
openJDKDownload(reject, source+ ' does not point to a JDK.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not point to a Java runtime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also need to add {allowJre: true} to findJavaHome call, L63
Closing as superseded by #152 |
Only JDK is supported. Generally users who don't develop with Java, have an installed JRE not a JDK. I think javac is used here because it was a copy/paste from jdt ls code which requires JDK.
This very simple PR checks if java exists and not javac. But it requires to declare the JRE with java.home. It should be improved to find JRE like we have that with JDK.