-
Notifications
You must be signed in to change notification settings - Fork 438
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
Unable to find JDK 8, it exists, eclipse has no issue, path is correct #157
Comments
I can confirm that setting |
Spoke too soon. I had a typo on the |
I have exactly the same issue on
|
@Coderah @AriHrannar please give 0.1.0 a try, and if the problem still persists, open the VS Code Developer Tools to see why the extension fails to start. |
ping @Coderah @AriHrannar ^^ |
@fbricon its fixed for me in the newest version of the extension (0.1.0) :) thank you! |
I created a super simple vscode extension and imported let javaHome = process.env['JAVA_HOME'];
console.log(`JAVA_HOME: ${javaHome}`);
console.log('pathExists: ' + pathExists.sync(javaHome)); When activate the extension I get
Even though the path exist
|
@attiand can you put a breakpoint in node_modules/path-exists/index.jsL15 and see why it fails? |
@attiand can you try the following:
or
|
@fbricon the exception is:
@snjeza I added the following let javaHome = process.env['JAVA_HOME'];
console.log(`JAVA_HOME: ${javaHome}`);
console.log('pathExists: ' + pathExists.sync(javaHome));
console.log('pathExists - 2: ' + pathExists.sync('/usr/lib/jvm/java-1.8.0-openjdk/'));
console.log('pathExists - 3: ' + pathExists.sync('/usr/lib/jvm/'));
console.log('pathExists - 4: ' + pathExists.sync('/home/mattias/')); which prints (note the last line which I have drwx------ access to):
The following ordinary javascript: 'use strict';
var pathExists = require("path-exists");
var javaHome = process.env['JAVA_HOME'];
console.log("JAVA_HOME: " + javaHome);
console.log('pathExists: ' + pathExists.sync(javaHome));
console.log('pathExists - 2: ' + pathExists.sync('/usr/lib/jvm/java-1.8.0-openjdk/'));
console.log('pathExists - 3: ' + pathExists.sync('/usr/lib/jvm/'));
console.log('pathExists - 4: ' + pathExists.sync('/home/mattias/')); prints:
|
@attiand could you try to make your small vscode extension use |
@fbricon, that throws Here is the extension: https://gist.github.com/attiand/16e24564dac93f5fa93bc3035e28596d |
@akurtakov does it look like your issue? |
Yes, looks exactly the same. |
I've also got the problem. Operating System: Ubuntu 18.04 LTS
|
I removed Oracle JDK 8 and update-alternatives uses |
Edit the User Settings |
Closing this issue for now as there have been a lot of updates/improvements to JDK detection. For example we've moved away from find-java-home to jdk-utils ( #2246 ). If this issue persists today, feel free to re-open and we can have a closer look. |
I've explicitly set
"java.home": "/usr/lib/jvm/java-8-openjdk-amd64"
however the JAVA_HOME env variable is also set to exactly that (the result is the same regardless), eclipse has no issue with this, however the extension reports "The java.home variable defined in VS Code settings does not point to a JDK."Environment
Current Result
JDK 8 is not found
Expected Result
JDK 8 is found
The text was updated successfully, but these errors were encountered: