What I would suggest, if you are using $soft, is that you create a batch file with all the dependencies you need for compiling, then call that batch file prior to compiling, which will give you the appropriate contents/references/etc. in your classpath. You do something similar with sh files if you are not in $soft, etc.
Jack On Tue, 21 Dec 2004 22:45:51 -0800 (PST), Manisha Sathe <[EMAIL PROTECTED]> wrote: > After lots of trial errors i found some very weired workaround. > > javac -classpath <big list of all jar files inside struts> <javafilename> > > and finally got compiled, but for each file i must do something like above. I > do not know how to set -classpath to javac permanently. Also why i need to > give the individual jar file names? Why i can not just give directory name - > which contains all jar files ? > > I am sure there will some better way of doing it, > > regards > Manisha > > Manisha Sathe <[EMAIL PROTECTED]> wrote: > Hi David, > > The situation is something like below. > > I am using Tomcat 5.0 server. I downloaded struts and extracted into another > folder. I do not have admin access so i can not change the path or class path > permanenetly as such i.e. going thr Control panel->Environment variables. > > I am not using any IDE tool. What i did -> Copied all jar files from struts > into my /common/lib. > I opened Command prompt. Set the path variable to /common/lib like > > C:>PATH=%PATH%;/common/lib > > then in the same window i tried to compile > > javac EmployeeForm.java > > But still it is same, not understanding ActionForm. Pls guide me. > > regards > Manisha > > "David G. Friedman" wrote: > Manisha, > > How are you compiling? Are you using Ant? Have you added the "lib" > directory to the CLASSPATH? Are you using Eclipse or another IDE? Have you > set the IDE to include the jar files when it builds/compiles the > application? > > Regards, > David > > -----Original Message----- > From: Manisha Sathe [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 21, 2004 9:38 PM > To: [EMAIL PROTECTED] > Subject: How to compile the java file with ActionForm / ActionMapping ? > > Just started using struts: I got following code from Web - but when i tried > to compile it i am getting error > > ----------------------------------------- > import org.apache.struts.action.ActionForm; > import org.apache.struts.action.ActionMapping; > public class EmployeeForm extends ActionForm { > private String name; > private String age; > public void setName(String name) { > this.name = name; > } > public void setAge(String age) { > this.age = age; > } > public String getName() { > return name; > } > public String getAge() { > return age; > } > } > > ------------------------------ > D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\Employe > eForm.java:3: package org.apache.struts.action does not exist > import org.apache.struts.action.ActionForm; > ^ > D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\Employe > eForm.java:4: package org.apache.struts.action does not exist > import org.apache.struts.action.ActionMapping; > ^ > D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\Employe > eForm.java:6: cannot resolve symbol > symbol : class ActionForm > location: class net.reumann.EmployeeForm > public class EmployeeForm extends ActionForm { > ^ > 3 errors > Tool completed with exit code 1 > > --------------------------------------------- > > I have copied all jar files inside /lib dir also modified web.xml and > struts-config.xml. i tried to set path also. > > What else is required to compile it ? > > Thanks and regards > Manisha > > --------------------------------- > Do you Yahoo!? > The all-new My Yahoo! Get yours free! > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------- > Do you Yahoo!? > Send a seasonal email greeting and help others. Do good. > > --------------------------------- > Do you Yahoo!? > Yahoo! Mail - 250MB free storage. Do more. Manage less. > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ ----------------------------------------------- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]