Hi Dan,
Thanks. It almost worked. It has only one error, see below:
[EMAIL PROTECTED] EXAMPLES_DIR]$ export GLOBUS_LOCATION=/usr/local/globus-4.0.4
[EMAIL PROTECTED] EXAMPLES_DIR]$ source $GLOBUS_LOCATION/etc/globus-user-env.sh
[EMAIL PROTECTED] EXAMPLES_DIR]$ export JAVA_HOME=/opt/j2sdk1.4.2_13
[EMAIL PROTECTED] EXAMPLES_DIR]$ export ANT_HOME=/opt/apache-ant-1.7.0
[EMAIL PROTECTED] EXAMPLES_DIR]$ export PATH=$ANT_HOME/bin:$JAVA_HOME/bin:$PATH
[EMAIL PROTECTED] EXAMPLES_DIR]$ source
$GLOBUS_LOCATION/etc/globus-devel-env.sh [EMAIL PROTECTED] EXAMPLES_DIR]$ javac
-classpath ./build/stubs/classes/:$CLASSPATH
org/globus/examples/clients/MathService_instance/Client.java
org/globus/examples/clients/MathService_instance/Client.java:10: error while
writing org.globus.examples.clients.MathService_instance.Client:
org/globus/examples/clients/MathService_instance/Client.class (Permission
denied)
public class Client {
^
1 error
[EMAIL PROTECTED] EXAMPLES_DIR]$
Any suggesstions is appreciated.
Regards
Gokop
Dan Gunter <[EMAIL PROTECTED]> wrote: Hi,
I'm no expert, but it looks to me if you don't set CLASSPATH explicitly, as
below, things may work. The script should set it for you! Try it:
source $GLOBUS_LOCATION/etc/globus-devel-env.sh
javac -classpath ./build/stubs/classes/:$CLASSPATH
org/globus/examples/clients/MathService_instance/Client.java
By setting CLASSPATH with something like "c:/foo", since CLASSPATH is
colon-separated, Java assumes you want two paths, "c" and "/foo" ; that
explains your error. I don't do Windows, so I don't know the right thing to do
here. But maybe the script does!
-Dan
Gokop Goteng wrote:
Hi Martin,
Thanks for your help again. I have read the classpath and is well understood.
What I don't understand in the MathService tutorial is what is the path for
CLASSPATH? I have tried to set as follows and still got errors:
source $GLOBUS_LOCATION/etc/globus-devel-env.sh
[EMAIL PROTECTED] EXAMPLES_DIR]$ export
CLASSPATH=c:/home/globus/EXAMPLES_DIR/org/globus/examples/clients/MathService_instance/Client.java
[EMAIL PROTECTED] EXAMPLES_DIR]$ javac -classpath
./build/stubs/classes/:$CLASSPATH
org/globus/examples/clients/MathService_instance/Client.java
Eclipse Java Compiler 0.319_R21x
Copyright IBM Corp 2000, 2003. All rights reserved.
Usage: <options> <source files | directories>
where options include:
-help display this help message
-version only display compiler version number
-classpath <dir 1>;<dir 2>;...;<dir P>
-bootclasspath <dir 1>;<dir 2>;...;<dir P>
-d <dir> destination directory (if omitted, no directory
is created)
-d none no classfile is generated
-target <ver> set classfile target (1.1 to 1.4, default is '1.1')
-1.3 use 1.3 compliance level (default)
-1.4 use 1.4 compliance level
-source <ver> set source level (1.3 or 1.4, default matches
compliance level)
-nowarn no warning (equivalent to '-warn:none')
-warn: <level> set warning level (e.g.
'-warn:unusedLocals,deprecation')
allDeprecation deprecation (including in deprecated
code)
assertIdentifier 'assert' used as identifier
constructorName method with constructor name
(default)
deprecation deprecation (outside
deprecated code) (default)
maskedCatchBlock hidden catch block
(default)
nls string literal lacking
non-nls tag //$NON-NLS-<n>$
packageDefaultMethod attempt to override package-default method
(default)
unusedArgument unused method argument (never read)
unusedImport unused import declaration
(default)
unusedLocal unused local variable (never
read)
unusedPrivate unused private member declaration
staticReceiver non-static reference to static member
(default)
noEffectAssign assignment without effect
(default)
syntheticAccess synthetic access for innerclass
interfaceNonInherited interface non-inherited method compatibility
(default)
noImplicitStringConversion char[] in String concat
(default)
tasks(<tag1>|...|<tagN>) tasks identified by tags inside comments
-deprecation equivalent to '-warn:deprecation' (default)
-g[:<level>] debug attributes level (default '-g:lines,source')
-g all debug info ('-g:lines,vars,source')
-g:none no debug info
-g:[lines,vars,source] selective debug info
-preserveAllLocals preserve unused local vars for debug purpose (default
is optimize out)
-noImportError no errors for unresolved imports (default is error)
-encoding <enc> specify a different default source encoding format
(custom encoding can be specified on
a per file basis by adding suffix
'[<enc>]' to file/folder names
-log <filename> specify a log file
-proceedOnError keep compiling when error, dumping class files with
problem methods (default is off)
-verbose print accessed/processed compilation units
-referenceInfo compute reference info
-progress show progress (only in -log mode)
-time display speed information
-noExit do not call System.exit(n) at end of
compilation (n=0 if no error)
-repeat <n> repeat compilation process <n> times (perf
analysis)
incorrect classpath: c
File
./build/stubs/classes/:c:/home/globus/EXAMPLES_DIR/org/globus/examples/clients/MathService_instance/Client.java
is missing
------------------------
[EMAIL PROTECTED] EXAMPLES_DIR]$
According to the Classpath tutorial, you can set CLASSPATH as environment
variable, please what is the path to the jar files? by sourcing
$GLOBUS_LOCATION/etc/globus-devel-env.sh, does it just create the jar files?
Sorry some of us are new to java and globus as well.
Again in the MathService tutorial, they are saying ./build/classes directory
should be included in the CLASSPATH. How? is it after CLASSPATH, before it or
in the middle? It is a bit confusing.
Any help is appreciated.
Kind regards
Gokop
[EMAIL PROTECTED] wrote: Looks like you forgot to add GT jars to your classpath.
Try what's described in the tutorial:
"We are now going to compile the client. Before running the
compiler, make sure you run the following:
source $GLOBUS_LOCATION/etc/globus-devel-env.sh
The globus-devel-env.sh script takes care of putting all the Globus
libraries into your CLASSPATH. When compiling the service, Ant took
care of this but, since we're not using Ant to compile the client, we
need to run the script."
Here's an explanation what the classpath is
http://en.wikipedia.org/wiki/Classpath_(Java) Martin
Dear All,
Plesae I am running the MathService tutorial on GT4 and I got this this
error:
[EMAIL PROTECTED] EXAMPLES_DIR]$ javac -classpath
./build/stubs/classes/:$CLASSPATH
org/globus/examples/clients/MathService_instance/Client.java ----------
1. ERROR in org/globus/examples/clients/MathService_instance/Client.java
!! no source information available !!
This compilation unit indirectly references the missing type
org.apache.axis.message.addressing.EndpointReferenceType (typically some
required class file is referencing a type outside the classpath)
----------
2. ERROR in org/globus/examples/clients/MathService_instance/Client.java
(at line 3)
import org.apache.axis.message.addressing.Address;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The import org.apache cannot be resolved
----------
3. ERROR in org/globus/examples/clients/MathService_instance/Client.java
(at line 4)
import org.apache.axis.message.addressing.EndpointReferenceType;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The import org.apache cannot be resolved
----------
4. ERROR in org/globus/examples/clients/MathService_instance/Client.java
(at line 19)
EndpointReferenceType endpoint = new EndpointReferenceType();
^^^^^^^^^^^^^^^^^^^^^
EndpointReferenceType cannot be resolved or is not a type
----------
5. ERROR in org/globus/examples/clients/MathService_instance/Client.java
(at line 19)
EndpointReferenceType endpoint = new EndpointReferenceType();
^^^^^^^^^^^^^^^^^^^^^
EndpointReferenceType cannot be resolved or is not a type
----------
6. ERROR in org/globus/examples/clients/MathService_instance/Client.java
(at line 20)
endpoint.setAddress(new Address(serviceURI));
^^^^^^^
Address cannot be resolved or is not a type
----------
6 problems (6 errors)
Please can anyone explain to me what $CLASSPATH stands for? Am I supposed
to set CLASSPATH as an environment variable? If yes, what should be the
complete path to set CLASSPATH to?
Kind regards
Gokop
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
__________________________________________________ Do You Yahoo!? Tired of
spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
--
Dan Gunter. voice:510-495-2504 fax:510-486-6363 dsd.lbl.gov/~dang
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com