Appendix B. Running client programs from any directory

A client launched directly through the java executable might fail if ran from a directory other then the GLOBUS_LOCATION (this usually happens if the client receives notifications). To ensure that a client can be started from any directory:

  • Set the GLOBUS_LOCATION system property on the java command line.

  • Put the GLOBUS_LOCATION directory as the very first entry in the classpath used by the client.

For example on Unix/Linux:

 $ java -DGLOBUS_LOCATION=$GLOBUS_LOCATION -classpath $GLOBUS_LOCATION:mylib.jar
   foo.MyClass

or on Windows:

 > java -DGLOBUS_LOCATION=%GLOBUS_LOCATION% -classpath %GLOBUS_LOCATION%;mylib.jar
   foo.MyClass