Software Links
Getting Started
- A Globus Primer
- Globus Is Modular!
- Quickstart
- Installing GT
- Platform Notes
- GT Developer's Guide
- GT User's Guide
- Migrating Guides
Reference
Manuals
Common Runtime
Security
- GSI C
- GSI Java
- Java WS A&A
- C WS A&A (coming soon)
- CAS
- Delegation Service
- MyProxy
- GSI-OpenSSH
- SimpleCA
Data Mgt
WS MDS
Execution Mgt
Table of Contents
Sometimes it might be necessary to run a Java program directly using the
java executable. There are two recommended ways of doing so
(the GLOBUS_LOCATION environment variable must first be set in
both cases):
![]() | Important |
|---|---|
If you are not using any of these two methods please take a look at Appendix B, Running client programs from any directory. |
The globus-devel-env script can be used to set the proper
CLASSPATH environment variable. To set the
CLASSPATH on Windows execute:
> %GLOBUS_LOCATION%\etc\globus-devel-env.bat
On Unix/Linux machines execute (for bash/sh):
$ . $GLOBUS_LOCATION/etc/globus-devel-env.sh
or (for csh/tcsh):
$ source $GLOBUS_LOCATION/etc/globus-devel-env.csh
Once the globus-devel-env is executed successfully run
the Java program, for example:
On Windows:
> java -DGLOBUS_LOCATION=%GLOBUS_LOCATION% foo.MyClass
On Unix/Linux:
$ java -DGLOBUS_LOCATION=$GLOBUS_LOCATION foo.MyClass
Note: Passing -DGLOBUS_LOCATION is not
necessary but will enable the client to execute from any directory.
Sometimes the above method might fail if the CLASSPATH
environment variable is too long for the OS to handle. With the bootstrap method, a bootstrap
code is executed first which sets the classpath programmatically and then invokes the specified
Java program. To invoke a Java program on Windows through bootstrap execute:
> java -cp %GLOBUS_LOCATION%\lib\bootstrap.jar
-DGLOBUS_LOCATION=%GLOBUS_LOCATION% \ org.globus.bootstrap.Bootstrap foo.MyClassOn Unix/Linux machines execute:
$ java -cp $GLOBUS_LOCATION/lib/bootstrap.jar -DGLOBUS_LOCATION=$GLOBUS_LOCATION \
org.globus.bootstrap.Bootstrap foo.MyClass
![[Important]](/docbook-images/important.gif)