Apr 04 2022 09:01 AM
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.
Apr 04 2022 10:53 AM
Solution@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?
Apr 04 2022 09:57 PM
$env:path+="/home/fang/.jdk/bin"
Apr 04 2022 11:32 PM