Forum Discussion

fsq2018's avatar
fsq2018
Copper Contributor
Apr 04, 2022
Solved

How to introduce Java commands into PowerShell on Linux platform.

As shown in the following figure, I can't use Java commands in PowerShell on Linux platform. How to set PowerShell to use Java commands on Linux platform.
  • Harm_Veenstra's avatar
    Apr 04, 2022

    fsq2018 The Java program is perhaps not in your path? If you do a write-host $env:PATH, what does it show you? If the path in which Java is located is missing, then you can add it to your Powershell profile by running nano $profile and adding and restart PowerShell to load the adjusted profile:

     

    $env:Path += "/path/to/java"

     

    I think the path should be in your ~/.bash_profile as JAVA_HOME? 

Resources