java classpath separator - ; vs :

LabKey Support Forum (Inactive)
java classpath separator - ; vs : Will Holtz  2015-01-13 10:58
Status: Closed
 
Twice now I have setup a development machine under OSX by following the directions at: https://www.labkey.org/wiki/home/Documentation/page.view?name=build (Set up a Development Machine). These directions are generally quite good, but I would like to propose a small addition. Can you make a note that the java classpath separator character is ";" under Windows and ":" under unix/OSX?

Thanks!
-Will
 
 
Steve responded:  2015-01-13 11:51
Hi Will:

Thanks, I have updated the docs with your note.

- Steve
 
antoniosarco responded:  2017-02-12 22:21
export CLASSPATH=/your/stuff/

or preserving system wide settings:

export CLASSPATH=$CLASSPATH:/your/addition/

the only different from Windows in terms of path-separators, : instead of ;

For example

java -classpath /mydir/mylib.jar:/otherdir/otherlib.jar com.MyProgram -Xmx64m

wildcard in the classpath to add multiple jars


java -cp "Halo.jar:lib/*" ni.package.MainClass

More about classpath...

http://net-informations.com/java/basics/path.htm

Anto