2

Somebody helped me run a java program with the following (working) line of code. The zookeeper-3.4.5.jar exists in the working directory. What it is the meaning of the .: syntax here? Does that just mean current directory? I would have written this as java -cp "zookeeper-3.4.5.jar" but I'm not 100% sure this would do the same thing as the line below.

java -cp .:zookeeper-3.4.5.jar org.zookeeper.LsGroup
6

The . is the current directory. The : is the path separator, used to separate multiple paths in a single option/variable under *nix. This command line therefore adds both . and zookeeper-3.4.5.jar to the Java classpath.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.