Giter Site home page Giter Site logo

Comments (5)

Eskibear avatar Eskibear commented on May 18, 2024

Exactly, currently VS Code is launched as a child process of the installer. Known issues are:

  • It inherits the environment variables, where newly installed JDK is not included.
  • For macOS catalina, it pops up a dialog showing the installer is asking for access to Documents folder, but actually it's vscode who needs the access.

The installer is developed in NodeJS, and VS Code is finally launched by child_process.spawn. So a potential solution is to find out a way to start VS Code with the updated envs.

One more issue for Windows. In Windows, if you double click the installer to open it, the envs are inherited from process explorer.exe. After the installer helps you install the JDK and set JAVA_HOME, if you once again open the installer, the newly installed JDK will not be detected, until you restart explorer.exe (by re-login or restart).

from vscode-java-installer.

Eskibear avatar Eskibear commented on May 18, 2024

Currently I don't find a way to assign latest envs to subprocess, seems impossible through NodeJS child_process module.

from vscode-java-installer.

Eskibear avatar Eskibear commented on May 18, 2024

And that's why we actually set java.home in vscode's user settings during the installation. Only when you don't have java.home set, it tries JAVA_HOME, JDK_HOME, etc. See how redhat.java extension looks for JDK.

that extension will fail, because VS Code gets started with an environment that does not know about these entries, yet.

Thus, it's expected not to fail...

from vscode-java-installer.

phaumer avatar phaumer commented on May 18, 2024

Thanks @Eskibear. I will have our extension look for the java.home setting.

from vscode-java-installer.

Eskibear avatar Eskibear commented on May 18, 2024

FYI, vscode-java extension now has an embedded JRE to run itself. So you don't have to look for java.home (which is deprecated).

So I'm closing this issue, though we still fail to find way to launch vscode with latest sysenv.

from vscode-java-installer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.