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 

1 Answer 1

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.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.