RE: [OT] java.lang.Object cannot be resolved

2006-02-11 Thread Caldarale, Charles R
 From: Martin Gainty [mailto:[EMAIL PROTECTED] 
 Subject: Re: java.lang.Object cannot be resolved
 
 Lets start with the easy stuff is 
 $JAVA_HOME\lib\rt.jar on your $CLASSPATH ???

The rt.jar should NOT be on CLASSPATH.  CLASSPATH refers to the location
of application classes, not ones provided by the JRE.  The location of
rt.jar is normally determined by working back from the location of the
launcher, but may be overridden by the -Xbootclasspath command line
parameter.  JAVA_HOME is frequently used by application scripts, but is
not used by the JVM/JRE itself.

Note that this problem is occurring during compilation of servlets, not
while Tomcat is running, so it's most likely a JRE installation problem
(there's no IDE involved).  Could also be an erroneous setting of the
-bootclasspath parameter for javac, but the OP provided little
information about exactly how he was compiling the servlets.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] java.lang.Object cannot be resolved

2006-02-11 Thread Caldarale, Charles R
 From: Sebastian Funk [mailto:[EMAIL PROTECTED] 
 Subject: Re: java.lang.Object cannot be resolved
 
 I never set $CLASSPATH, but when I call rt.jar via javac -cp .../ 
 rt.jar Servlet.java, it works fine. Should I set $CLASSPATH or is  
 that enough?

No, you don't want to put rt.jar on the -cp parameter.  Classes from
rt.jar are loaded via the bootstrap classloader, not the system
classloader, and the security attributes are different for the two
loaders.

Something seems to be wrong with your JDK installation.  Where is javac
located?  Where is rt.jar located?  What is your complete javac command
line?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]