question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.configuration.runtimes in settings.json are ignored

See original GitHub issue

[provide a description of the issue]

Environment
  • Operating System: Ubuntu linux 20.10
  • JDK version: several – 1.8, 16
  • Visual Studio Code version: 1.52.1
  • Java extension version: v0.78.0
Steps To Reproduce
  1. Open VS Code
  2. Open settings preferences
  3. Enter/search for: java.configuration.runtimes
  4. Enter name and path for different JDK-s
  5. Nominate a default

There is no project yet – I can’t even establish a session with the JDK of choice. Also the plugin goes off and finds some Java JDK-s that are not the ones I wish to use. There does not seem to be any place were I can say what I need to use in the project.

Please attach logs

  • This gave me the following error:

    Command 'Java: Open Java Language Server Log File' resulted in an error (command 'java.open.serverLog' not found)
    
Current Result
  • JDK-s configured do not show in the ‘Configure Java Runtime’ on any tab.
Expected Result
  • I at least wanted to see the Java versions I entered show up as project JDK-s
  • I would also like them to show in the list of “instaled Java-s”
  • I would like a place where I can explicitly specify which Java versions I want the Java Plugin to recognise – ALL those I want to use at a particular time and No Other JDK-s even if there are installed.
    • Not all the relevant JDK-s are available in “expected” locations
Additional Informations

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
sellieracommented, Feb 5, 2022

Hello, This proposition will be very helpful. When one has several java projects not managed by build tools, requiring different versions of java (e.g. 1.8 versus 11), it is very annoying to have to change the default runtime each time one switch from one project to the other. Also, this can provide a good solution to #1684 when not using the build tools.

A similar proposition was made for https://github.com/redhat-developer/vscode-java/issues/1555 by @n-peugnet

1reaction
thakkarparth007commented, Mar 2, 2022

Just adding some noise here to bump up the priority of the issue. It would be super useful to have this setting workspace-configurable! Seems like it should be a quick fix, I’d be happy to chip in a PR if someone could give a starting pointer.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VSCode can't setup Java Runtime (tried a few settings json ...
Open Command Palette and choose Java: Configure Java Runtime. Below the option Java Tooling Runtime, the value of JDK for Language Server is ......
Read more >
redhat-developer/vscode-java - Gitter
Hello! Anyone know if there's any way to get the extension (more accurately JDTLS) to ignore .classpath files? Sadly, neither removing nor modifying...
Read more >
Java project management in Visual Studio Code
Configure Runtime for Projects. As Java evolves, it's common that developers work with multiple versions of JDK. You can map them to your...
Read more >
Settings | JetBrains Fleet Documentation
The corresponding settings are managed through a set of .json files. ... If a layer with higher priority does not override a setting, ......
Read more >
Edit runtime and environment settings for Standard logic apps
When you deploy to Azure, app settings are ignored and aren't ... host.json, File, Contains runtime-specific configuration settings and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found