Hello again!

Arrrgggh. I'm feeling totally lost. I can't even get the mail component 
from Matthew and Carsten's book byte-compiled... :-(

Just to cite some system details first: I have a Debian Woody system, 
Tomcat is 4.0.3. I have the latest SDK from Blackdown. 
During the past few days, I've erased and reinstalled everything that 
has to do with Java, Tomcat and Cocoon many times. Cocoon is 2.1-dev, 
compiled a couple of days ago from CVS. 

Tomcat constructs it's own classpath, as I've understood it, but I've 
got to make sure that I have the correct classpath when I compile 
stuff, right?

Well, I have set it to 
> echo $CLASSPATH
/var/lib/tomcat4/webapps/WEB-INF/classes:/var/lib/tomcat4/webapps/WEB-INF/lib:/var/lib/tomcat4/webapps/cocoon/WEB-INF/classes:/var/lib/tomcat4/WEB-INF/lib:/var/lib/tomcat4/webapps/examples/WEB-INF/classes:/var/lib/tomcat4/webapps/examples/WEB-INF/lib

That should cover most of it. But when I compile:
> javac MailComponent.java
MailComponent.java:3: cannot resolve symbol
symbol  : class Component
location: package component
import org.apache.avalon.framework.component.Component;
                                             ^
MailComponent.java:6: cannot resolve symbol
symbol  : class Component
location: interface cxa.component.mail.MailComponent
extends Component
        ^
2 errors

I interprete this compile-time error to mean that it can't find 
org.apache.avalon.framework.component.Component. It is natural to 
assume that it has something to do with the classpath. So I go on to 
look for the class, and it appears to be here:
> jar tvf 
/var/lib/tomcat4/webapps/WEB-INF/lib/avalon-framework-20020627.jar | 
grep Component
   137 Thu Jun 27 18:40:08 CEST 2002 
org/apache/avalon/framework/component/Component.class

So, even if the classpath has it's weaknesses, I should get rid of at 
least _this_ error by including the classpath at the command line, 
right?

I can't even get that working...:
> javac -classpath /var/lib/tomcat4/webapps/WEB-INF/lib/ 
MailComponent.java
MailComponent.java:3: cannot resolve symbol
symbol  : class Component
location: package component
import org.apache.avalon.framework.component.Component;
[...snip...]

Oh well, I don't think I've ever felt this lost before. I was able to 
compile a "Hello World" minimal example, though...

Best,

Kjetil
-- 
Kjetil Kjernsmo
Astrophysicist/IT Consultant/Skeptic/Ski-orienteer/Orienteer/Mountaineer
[EMAIL PROTECTED]  [EMAIL PROTECTED]  [EMAIL PROTECTED]
Homepage: http://www.kjetil.kjernsmo.net/


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

Reply via email to