Troubleshooting the command-line
This article provides tips and workarounds when using the command-line interface.
The command-line reports unknown host
The command-line is packaged with only the necessary libraries to support a bootstrap process to download the rest of the required modules. This bootstrap requires that the JDK can access a remote repository using http(s) interfaces. If an unknown host error displays when you are first trying to use the command-line, then there is an issue with accessing the required remote repositories.
The issue is typically due to one of the following problems:
- A proxy needs to be configured
- A firewall is blocking the JDK from accessing the remote repository
If a proxy is required to access external sites, then the proxy support must be configured through the command-line scripts.
If a proxy is not required, then check to see if there is a firewall blocking the JDKs access external Web sites.
How the CLI determines which Java command to use
The command-line scripts first try to find the Java™ command using the JAVA_HOME environment variable.
If the JAVA_HOME variable is set and the JAVA_HOME/bin/java directory exists, then that is the Java command
that used. However, if the JAVA_HOME variable is not set, or the JAVA_HOME/bin/java directory does not exist,
then the current path environment variable is used to find a Java command.
- If the
JAVA_HOMEvariable is used to find the Java command, then theJAVA_HOME/bin directory is added to the local path on Windows™. -
The
zero versioncommand displays the location of the Java command that is being used. The scripts also support a debug mode that displays additional information. Edit the zero script to enable debug, which also displays the Java command that is used.
Shell commands the command-line uses
The command-line scripts require several commands on Linux™ and Mac. The list includes:
- chmod
- sed
- readlink
The command-line reports task handler was not found
The command-line attempts to find a task handler for the requested command and report an error if a matching handler can
not be found. If you get this error, first check that the command name was typed correctly. If you think the command
should have been found, like zero start for a module, then make sure the module is resolved. If a module is
not resolved, then only the tasks available through module zero.cli.tasks are available. The command zero
help can be used to see the list of commands available.