tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Sabroff <mike.sabr...@cygnusb2b.com>
Subject Re: java.lang.Object cannot be resolved
Date Sun, 12 Feb 2006 18:05:42 GMT
Do you have JAVA_HOME set in the catalina.sh or setenv.sh which it 
includes if it is there, in other words have you told tomcat 
specifically in one of its startup shells where your JAVA_HOME is?

Sebastian Funk wrote:
> Hi Martin,
>
> I reinstalled JDK as well as JRE and both didn't change neither 
> $CLASSPATH nor $JAVA_HOME.
> I set $JAVA_HOME to /usr/lib/jdk, it's a link to /usr/lib/jdk1.5.0_05.
> But without rt.jar in -cp it doesn't work. My whole javac-line is:
>     'sudo javac -cp 
> /home/tomcat/tomcat/common/lib/servlet-api.jar:/home/tomcat/mysql-connector-java-3.1.11-bin.jar:/usr/lib/jdk/jre/lib/rt.jar:.'

>
>
> On Feb 11, 2006, at 10:21 PM, Martin Gainty wrote:
>
>> Good Afternoon Sebastian-
>> *usually* the JDK/JRE install is supposed to do that for you
>> But as I found this past week (even webapps that cost alot of money) 
>> installs sometimes dont always do the complete task
>> I would re-install the JDK/JRE and let the install configure your 
>> initial CLASSPATH for you
>> make sure $JAVA_HOME is set correctly (and exported) otherwise things 
>> like
>> $JAVA_HOME/bin/java and setting 
>> $CLASSPATH=$JAVA_HOME/jre/lib/rt.jar:$CLASSPATH
>> wont work
>> Martin-
>> ----- Original Message ----- From: "Sebastian Funk" 
>> <sebastian.funk@gmail.com>
>> To: "Tomcat Users List" <users@tomcat.apache.org>
>> Sent: Saturday, February 11, 2006 4:05 PM
>> Subject: Re: java.lang.Object cannot be resolved
>>
>>
>>> Hi,
>>>
>>> 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?
>>>
>>> On Feb 11, 2006, at 9:49 PM, Martin Gainty wrote:
>>>
>>>> Lets start with the easy stuff is $JAVA_HOME\lib\rt.jar on your 
>>>> $CLASSPATH ???
>>>>
>>>> Martin-
>>>>
>>>> ----- Original Message ----- From: "David Smith" <dns4@cornell.edu>
>>>> To: "Tomcat Users List" <users@tomcat.apache.org>
>>>> Sent: Saturday, February 11, 2006 1:56 PM
>>>> Subject: Re: java.lang.Object cannot be resolved
>>>>
>>>>
>>>>> Looks like the kind of weirdness that makes me think the JVM has  
>>>>> become unstable. Have you tried to restart Tomcat?
>>>>> -- David
>>>>> Sebastian Funk wrote:
>>>>>>
>>>>>> On Feb 11, 2006, at 6:30 PM, Caldarale, Charles R wrote:
>>>>>>
>>>>>>>> From: Sebastian Funk [mailto:sebastian.funk@gmail.com]
>>>>>>>> Subject: java.lang.Object cannot be resolved
>>>>>>>>
>>>>>>>>              import java.lang.Object;
>>>>>>>>
>>>>>>>>     The type java.lang.Object cannot be resolved. It is indirectly
>>>>>>>> referenced from required .class files
>>>>>>>
>>>>>>> Don't know why you're suddenly getting this message, but there's
no
>>>>>>> reason to import java.lang.Object (or anything else from  
>>>>>>> java.lang, for
>>>>>>> that matter).  There is an implicit import of java.lang.* for
all
>>>>>>> compilations (see Java language spec, section 7.5.5).
>>>>>>>
>>>>>>>  - Chuck
>>>>>> I get that message at the first import-statement. When I don't  
>>>>>> import java.lang.Object, then I get exactly the same, e.g.:
>>>>>>     1. ERROR in Familie.java
>>>>>>     (at line 1)
>>>>>>             import javax.servlet.*;
>>>>>>            ^
>>>>>>     The type java.lang.Object cannot be resolved. It is  
>>>>>> indirectly referenced from required .class files
>>>>>>
>>>>>> Any ideas?
>>>>>>
>>>>>> Greetings,
>>>>>> Sebastian Funk
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --------------------------------------------------------------------

>>>>>> -
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

-- 
Mike Sabroff
Web Services Developer
mike.sabroff@cygnusb2b.com
920-568-8379


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message