Skip to content
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

Ignoring settings for Java version #768

Closed
chriscamplejohn opened this issue Feb 28, 2020 · 4 comments
Closed

Ignoring settings for Java version #768

chriscamplejohn opened this issue Feb 28, 2020 · 4 comments

Comments

@chriscamplejohn
Copy link

I have JAVA_HOME set to /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
I also have "java.home": "/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home" in my user configuration file.

Environment
  • Operating System: macOS Catalina 10.15.1
  • JDK version: Multiple (AdoptOpenJDK 11, AdoptOpenJDK 8, Java SE 8)
  • Visual Studio Code version: 1.42.1
  • Java extension version: 0.25.0
Steps To Reproduce
  1. Set the settings detailed above with the above JDKs installed
  2. Debug or Run a Java application
Current Result

Runs with Open JDK 11.
Java Version Issue

Expected Result

Runs with Open JDK 8.

Additional Informations

When I run the same project with IntelliJ it happily picks up my JAVA_HOME environment variable and uses the correct version of Java.

@testforstephen
Copy link
Contributor

Could you share us the following info?

  • In VS Code, run Help -> Open Process Explorer, Copy All and share the process explorer data.
  • What Java version is your project using? Debugger 0.25.0 adds a feature to use the project's Java runtime to launch the application.

@chriscamplejohn
Copy link
Author

chriscamplejohn commented Mar 5, 2020

So...having closed the application in IntelliJ, closed vs code, re-opened the project in vs code to get the process explorer data, it has now picked up the correct version. I had closed down vs code before, so not sure what has changed this time. What do you mean by what Java version is my project using? It is built with gradle and no specific version of Java is set anywhere other than the places I outlined.

image

@testforstephen
Copy link
Contributor

What do you mean by what Java version is my project using? It is built with gradle and no specific version of Java is set anywhere other than the places I outlined.

For gradle project, it will use the current JVM version if you didn't specify java version explicitly. So you cannot reproduce the issue, right?

@chriscamplejohn
Copy link
Author

No - not at present.

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

No branches or pull requests

2 participants