Problem
When using the dev container Remote Project scenario,
the following error could occur:
Executing "java -version" command…
bash: line 1: java: command not found
Process exited with non-zero code 127
Resolution
As mentioned in our documentation Java 17+ is necessary to be installed on the Remote server where the Docker Engine is running.
-
If Java is not installed on the remote server, install it, for example, using this instruction or via the package manager (
apt install openjdk-17-jdk openjdk-17-jrefor Ubuntu). -
If Java is installed, try to perform the following workarounds:
- if Java is newer than 17, try to install Java 17 instead;
- create a symlink for
javacommand in/usr/local/bin.
Note that the IDE executes the commands on the remote server via the non-interactive non-login shell. The .bashrc, .profile, and other similar files will not affect the command execution.
Comments
0 comments
Please sign in to leave a comment.