Reputation: 96391
The title has it all, when setting up a class path to be used by your program, what is the significance of .:
construct?
Consider
/Library/Java/Home/bin/java -cp $APP_HOME/lib/*.jar:: Handler
vs
/Library/Java/Home/bin/java -cp .:$APP_HOME/lib/*.jar:: Handler
Upvotes: 1
Views: 936
Reputation: 321
For the code particular fragment given above: /Library/Java/Home/bin/java -cp .:$APP_HOME/lib/*.jar:
this would mean the current directory (denoted by '.') is to be looked at first before all the jars in the $APP_HOME directory.
: is the classpath separator in unix whereas ; is the classpath separator in windows.
Upvotes: 0
Reputation: 993173
Paths in the classpath are separated from one another by :
. So .
is just the first entry in the classpath list, which refers to the current directory.
Upvotes: 7