Skip to content

Conversation

@angelozerr
Copy link
Contributor

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.

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.
@fbricon
Copy link
Collaborator

fbricon commented May 15, 2019

We need to introduce a vscode-xml specific java.home variable, maybe xml.java.home, that supports a JRE, that'd be checked 1st, then fall back to java.home (which, when used along vscode-java needs to be a JDK)

}
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.');
Copy link
Collaborator

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

Copy link
Collaborator

@fbricon fbricon left a 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

@xorye xorye mentioned this pull request Jun 5, 2019
@fbricon
Copy link
Collaborator

fbricon commented Jun 10, 2019

Closing as superseded by #152

@fbricon fbricon closed this Jun 10, 2019
@fbricon fbricon removed this from the v0.7.0 milestone Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants