Hi Hilary,
For windows I use this strutscompile.bat file. The compile ignores
the  classpath environment variable, buidling it's own, which is I
think what Sun reccomend.
Hope it helps, better still can some-one post a better one?!
Keith
=========================================================
@echo off
rem ------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 - strutscompile MyClass.java
rem ------variables mcp=My class path
rem ------          mout= my output library (where the class file
goes)

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

set mcp=.
set mcp=%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%





--- Hilary  Pagliughi <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I am modifying the example app for struts, just adding another
> profile
> property to see how things fit together.  My problem is that I
> can't compile
> any of the java files that reference other classes, even ones I
> haven't
> modified.  I know somehow that the solution to this is easy and
> that I
> should be able to figure it out on my own, but I've spent too much
> time on
> this so I give in!  I couldn't find anything helpful when searching
> the
> archives except that it seems like it has something to do with my
> classpath.
> Specifically, I am trying to compile User.java, and I was unable to
> compile,
> as a test, Subscription.java as well.  However, I am able to
> compile
> RegistrationForm.java just fine (which doesn't reference any of the
> example
> classes).
> 
> Here is my classpath(which includes the directory for where the
> .class files
> are for the example app as well as the directory that the .java
> files are
> in)(I'm compiling in my editor, JCreator):
> 
> C:\Program Files\Allaire\JRun\servers\default\Struts
> Example\WEB-INF\classes\org\apache\struts\webapp\example;C:\Program
> Files\Allaire\JRun\servers\default\Struts
> Example\WEB-INF\lib\struts.jar;C:\Program
> Files\Allaire\JRun\servers\default\Struts
> Example\WEB-INF\src\org\apache\struts\webapp\example;C:\Program
>
Files\Allaire\JRun\lib\ext\servlet.jar;C:\jdk1.3.1\jre\lib\rt.jar;C:\jdk1.3.
> 1\jre\lib\i18n.jar;C:\jdk1.3.1\lib\dt.jar;C:\jdk1.3.1\lib\tools.jar
> 
> and here is a sample error (they are all the same pretty much):
> 
> C:\Program Files\Allaire\JRun\servers\default\Struts
> Example\WEB-INF\src\org\apache\struts\webapp\example\User.java:272:
> cannot
> resolve symbol
> symbol  : class Subscription  
> location: class org.apache.struts.webapp.example.User
>     public Subscription findSubscription(String host) {
>            ^
> 
> Thank you in advance,
> 
> Hilary
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Reply via email to