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 not work when use remote connect to centos

See original GitHub issue
Environment
  • Operating System: windows10
  • JDK version: system JDK11, project need jdk1.8
  • Visual Studio Code version: 1.58.2
  • Java extension version: Java Extension Pack 0.17.0
Steps To Reproduce
  1. centos: set env $JAVA_HOME to jdk11 path
export JAVA_HOME=/usr/java/jdk-11.0.11
export JDK_HOME=/usr/java/jdk-11.0.11
  1. check “Configure Java Runtime”, seems that the java tooling runtime is normal image

  2. config remote settings.json and set java.configuration.runtimes with jdk1.8 and jdk16 image

image

  1. both jdk1.8 and jdk16 cannot be recognized in “installed jdks” tag image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Eskibearcommented, Aug 5, 2021

https://github.com/redhat-developer/vscode-java/blob/b9032f1b319e6077f5c3e7783e9c58362114dd67/src/findJavaRuntimes.ts#L30-L34

It detects JDK by checking JAVA_HOME, JDK_HOME, PATH, and some hardcoded locations. /usr/java is not included. The hardcoded place for Linux is /usr/lib/jvm

0reactions
smiecjcommented, Aug 17, 2021

By the way, after configuration:

image

image

image

You may need to reboot remote machine(centos) after add JDK_HOME env.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to remote connect VisualVM to CentOS - Stack Overflow
1 Answer 1 · Thnks I have added the config "-Dcom.sun.management. · You have set authenticate=false . Try without username and password in ......
Read more >
Remote Development Tips and Tricks - Visual Studio Code
To access your config file, run Remote-SSH: Open Configuration File... in the Command Palette (F1). You can then work with your admin to...
Read more >
Developer workflows using the VS Code for Java extension 1.0
We'd like to take the opportunity to showcase a few workflows that really make it enjoyable to develop Java applications in Visual Studio...
Read more >
Manually deploy a Java web environment on a CentOS 7 ...
To stop the firewall service and configure the service not to automatically start on instance startup, run the following command:
Read more >
8 Time Zone Settings in the JRE
Troubleshoot Problems with TZupdater. Sometimes, when you run tzupdater , it quits with the message: “There's no tzdata available for this Java runtime." ......
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