Skip to content

The "path" argument must be of type string. Received type object #1449

Closed

Description

@AdityaGovardhan

Installed Oracle JDK, created JAVA_HOME variable.

$ echo $JAVA_HOME
/home/adi/Software/jdk1.8.0_251

Installed Language Support for Java(TM) by Red Hat (Extension)

Restarted VS Code but it leads to the following error display
image

Environment
  • Operating System: Ubuntu 20.04
  • JDK version: jdk1.8.0_251
  • Visual Studio Code version: 1.45.0
  • Java extension version: 0.61.0

vscode-java logs
image

Java Language Server's workspace logs
image

Current Result

JDK should be detected from JAVA_HOME environment variable as per https://github.com/redhat-developer/vscode-java#setting-the-jdk but it is not able to

Expected Result

installed java, VS Code and Red Hat extension should work together seamlessly

Additional Informations

Activity

  1. fbricon commented on May 14, 2020

    @fbricon
    Collaborator

    Can you paste the content of your user settings.json?

  2. AdityaGovardhan commented on May 14, 2020

    @AdityaGovardhan
    Author

    Hi @fbricon
    I was able to figure out the issue, turns out that I was defining the JAVA_HOME variable in my ~/.bashrc but not exporting it. This lead to vs-code process being unaware of the JAVA_HOME variable. Rookie mistake, sorry. https://stackoverflow.com/questions/1158091/defining-a-variable-with-or-without-export

    Thanks for your comment, closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions