Re: java.lang.Object cannot be resolved
Hi, Do you really need sudo here? Perhaps that's creating some issues. doesn't seem so. I get exactly the same error in my home directory. What happens if you try to compile a simple Hello World program, without anything specified for -cp? (Try it with and without sudo to see if that makes a difference.) No, simple javac Hello.java doesn't work. Only if I set $CLASSPATH to /usr/lib/jdk/jre/lib/rt.jar or with the -cp-option. What environment variables do you have set? Do you mean $CLASSPATH? For the Hello World program no one. Greetings, Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.lang.Object cannot be resolved
From: Sebastian Funk [mailto:[EMAIL PROTECTED] Subject: Re: java.lang.Object cannot be resolved No, simple javac Hello.java doesn't work. Only if I set $CLASSPATH to /usr/lib/jdk/jre/lib/rt.jar or with the -cp-option. Then your JDK installation is broken. Where is javac being executed from? It should be coming from the /usr/lib/jdk/bin directory, and the various pieces of the JVM should be in /usr/lib/jdk/jre/bin and its subdirectories. Is that the case? Do you mean $CLASSPATH? For the Hello World program no one. No, I mean any and all environment variables. There may be something that's messing up the launchers. - 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: java.lang.Object cannot be resolved
Hi, On Feb 13, 2006, at 5:56 PM, Caldarale, Charles R wrote: From: Sebastian Funk [mailto:[EMAIL PROTECTED] Subject: Re: java.lang.Object cannot be resolved No, simple javac Hello.java doesn't work. Only if I set $CLASSPATH to /usr/lib/jdk/jre/lib/rt.jar or with the -cp-option. Then your JDK installation is broken. Where is javac being executed from? It should be coming from the /usr/lib/jdk/bin directory, and the various pieces of the JVM should be in /usr/lib/jdk/jre/bin and its subdirectories. Is that the case? no, javac was set to /usr/bin/javac but with /usr/lib/jdk/bin/javac ist works fine. Thanks a lot. Greetings, Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.Object cannot be resolved
try as root: rpm -e `rpm -q -f /usr/bin/javac` Or something like that. Basically uninstall which ever pitiful excuse for java is installed on your system by default leaving only the sun jdk. Probably a good idea to check that nothing needs it before you do it. On that note, why do certain linux distributions insist on installing bearly usable java versions ? On 13/02/06, Sebastian Funk [EMAIL PROTECTED] wrote: Hi, On Feb 13, 2006, at 5:56 PM, Caldarale, Charles R wrote: From: Sebastian Funk [mailto:[EMAIL PROTECTED] Subject: Re: java.lang.Object cannot be resolved No, simple javac Hello.java doesn't work. Only if I set $CLASSPATH to /usr/lib/jdk/jre/lib/rt.jar or with the -cp-option. Then your JDK installation is broken. Where is javac being executed from? It should be coming from the /usr/lib/jdk/bin directory, and the various pieces of the JVM should be in /usr/lib/jdk/jre/bin and its subdirectories. Is that the case? no, javac was set to /usr/bin/javac but with /usr/lib/jdk/bin/javac ist works fine. Thanks a lot. Greetings, Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.Object cannot be resolved
because some distribution like debian only offer FREE and OPEN SOURCE software, which Sun's JDK is not... regards Leon On 2/13/06, Antony Riley [EMAIL PROTECTED] wrote: try as root: rpm -e `rpm -q -f /usr/bin/javac` Or something like that. Basically uninstall which ever pitiful excuse for java is installed on your system by default leaving only the sun jdk. Probably a good idea to check that nothing needs it before you do it. On that note, why do certain linux distributions insist on installing bearly usable java versions ? On 13/02/06, Sebastian Funk [EMAIL PROTECTED] wrote: Hi, On Feb 13, 2006, at 5:56 PM, Caldarale, Charles R wrote: From: Sebastian Funk [mailto:[EMAIL PROTECTED] Subject: Re: java.lang.Object cannot be resolved No, simple javac Hello.java doesn't work. Only if I set $CLASSPATH to /usr/lib/jdk/jre/lib/rt.jar or with the -cp-option. Then your JDK installation is broken. Where is javac being executed from? It should be coming from the /usr/lib/jdk/bin directory, and the various pieces of the JVM should be in /usr/lib/jdk/jre/bin and its subdirectories. Is that the case? no, javac was set to /usr/bin/javac but with /usr/lib/jdk/bin/javac ist works fine. Thanks a lot. Greetings, Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.Object cannot be resolved
Sebastian- Sorry Im just a portal developer and not a Super User 'sudo' guy Im used to sticking environment variables into .profile or .bashrc files or execute at home/$USER as . .profile Thanks, Martin- 603-438-6038 - Original Message - From: Sebastian Funk [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Sunday, February 12, 2006 6:04 AM Subject: Re: java.lang.Object cannot be resolved 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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.lang.Object cannot be resolved
From: Sebastian Funk [mailto:[EMAIL PROTECTED] Subject: Re: java.lang.Object cannot be resolved I set $JAVA_HOME to /usr/lib/jdk, it's a link to /usr/lib/jdk1.5.0_05. JAVA_HOME has no effect on compilations; the Tomcat startup scripts use it to find the installed JRE/JDK, but the standard Java launchers (e.g., java, javac) don't use it. 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:.' Do you really need sudo here? Perhaps that's creating some issues. What happens if you try to compile a simple Hello World program, without anything specified for -cp? (Try it with and without sudo to see if that makes a difference.) What environment variables do you have set? - 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: java.lang.Object cannot be resolved
From: Sebastian Funk [mailto:[EMAIL PROTECTED] 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 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: java.lang.Object cannot be resolved
On Feb 11, 2006, at 6:30 PM, Caldarale, Charles R wrote: From: Sebastian Funk [mailto:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.lang.Object cannot be resolved
From: Sebastian Funk [mailto:[EMAIL PROTECTED] Subject: Re: java.lang.Object cannot be resolved The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files This would imply that javac (or whatever compiler is being used) cannot find rt.jar, since java.lang.Object is pretty much the first class used to resolve references. Did something go bad with your JRE/JDK installation? - 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: java.lang.Object cannot be resolved
On 2/11/06, Sebastian Funk [EMAIL PROTECTED] wrote: On Feb 11, 2006, at 6:30 PM, Caldarale, Charles R wrote: From: Sebastian Funk [mailto:[EMAIL PROTECTED] 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 Maybe the JAVA_HOME or CLASSPATH variables are set wrong, or rt.jar is missing? (rt.jar is where Object lives, in Sun's JRE at least.) -- Len - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.Object cannot be resolved
Lets start with the easy stuff is $JAVA_HOME\lib\rt.jar on your $CLASSPATH ??? Martin- - Original Message - From: David Smith [EMAIL PROTECTED] 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:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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 [EMAIL PROTECTED] 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:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.Object cannot be resolved
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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]