[opencms-dev] Template example: compiling control code

Andreas Urra andreas.urra at x-cellent.com
Tue Jan 29 12:00:07 CET 2002


Hello Manfred,

Java requires *.jar files to go on the classpath directly, that is: by name (not
just into the directory)

e.g.
[...]\opencms\WEB-INF\oclib\opencms.jar

Thats should be it.

Greetings,

Andreas



Manfred Pruntsch wrote:

> Hello,
>
> I'm experiencing with the examples in the template mechanism documentation.
> When I try to compile the Java class that controls the output of the
> template (page 12) I've got some error messages like this:
>
> C:\Programme\tomcat4\jakarta-tomcat-4.0.1\webapps\opencms\WEB-INF\oclib>%JAV
> A_HOME%
> /bin/javac CmsExample4.java
> CmsExample4.java:1: package com.opencms.template does not exist
> import com.opencms.template.*;
> ^
> CmsExample4.java:2: package com.opencms.file does not exist
> import com.opencms.file.*;
> ^
>
> It seems that the compiler doesn't find the packages.
> My Classpath pointed to the ...\opencms\WEB-INF\oclib\ directory. The file
> 'opencms.jar' contains the
> appropriate packages.
> To avoid this problem I copied the 'opencms.jar' file in the jdk/lib
> directory...with the same result.
>
> What goes wrong? Any advice is welcome.
>
> many thanks
> Manfred




More information about the opencms-dev mailing list