You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by peter <pe...@btinternet.com> on 2001/09/11 11:47:35 UTC

setting classpath

hi

I'm trying to compile some classes but am getting errors indicating my struts packages cannot be found.  Is it because I've not set my CLASSPATH variable?  If so, how do I dynamically set the CLASSPATH variable to include the struts.jar, commons.*.jar files?

Thanks

Peter

Re: setting classpath

Posted by Keith Bacon <ke...@yahoo.com>.
Peter,
If you're on windows this batch file can be adapt to your
environment.
I think this is a good way to get started, for proper big projects
people seem to use the Ant tool.
regards,
Keith.




@echo off
rem ------Biff1Compile.bat - Compile a java file in biff1 web-app.
rem ------servlet.jar not needed in classpath if it's installed as
java extension
rem ------use in a dos window - CompileBiff1 MyClass.java
rem ------variables mcp=My class path
rem ------          mout=My output library (where the class file
goes)
rem ---You may need to run the following commands if they aren't in
effect in your environment.
rem --- set path=%path%;C:\jdk1.3.0_02\bin
rem --- set  JAVA_HOME=C:\jdk1.3.0_02
rem --- 	

cd C:\jakarta-tomcat-3.2.2\webapps\biff1\WEB-INF\classes

set mcp=C:\jakarta-tomcat-3.2.2\webapps\biff1\WEB-INF\classes
set
mcp=%mcp%;C:\jakarta-tomcat-3.2.2\webapps\biff1\WEB-INF\lib\struts.jar
set mcp=%mcp%;C:\jakarta-tomcat-3.2.2\lib\servlet.jar

set mout="C:\jakarta-tomcat-3.2.2\webapps\biff1\WEB-INF\classes"

set mcmd=javac -d  %mout%  -classpath  %mcp%  %1

%mcmd%



--- peter <pe...@btinternet.com> wrote:
> hi
> 
> I'm trying to compile some classes but am getting errors indicating
> my struts packages cannot be found.  Is it because I've not set my
> CLASSPATH variable?  If so, how do I dynamically set the CLASSPATH
> variable to include the struts.jar, commons.*.jar files?
> 
> Thanks
> 
> Peter
> 


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com