This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes how to compile my struts files in command prompt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to compile my struts files in command prompt" Watch "how to compile my struts files in command prompt" New topic
Author

how to compile my struts files in command prompt

len kumar
Greenhorn

Joined: Sep 21, 2009
Posts: 4
Hi ,

I am new to struts i want to compile my struts files in command prompt.

how to do that and how to set the classpath using command prompt.


can anybody help me out please....

Thanks in Advance.


Thanks & Regards,
Len.

Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

Hi Len, welcome to javaranch.

you can set the classpath as


You'll need to include the struts jar into the classpath (depending upon the version of struts, the needed jars will vary). I would recommend that you use an IDE (eclipse or netbeans etc) or a build script (ant or maven)...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
len kumar
Greenhorn

Joined: Sep 21, 2009
Posts: 4
Hi,

I have set classpath given below:

I am doing some mistake but unable to idetify please help me out .............


C:\strutsprac-war\WEB-INF\classes>set classpath=.;struts.jar;servlet-api.jar;

C:\strutsprac-war\WEB-INF\classes>javac -d . *.java

Output:
C:\strutsprac-war\WEB-INF\classes>javac -d *.java
EmployeeAction.java:2: package javax.servlet does not exist
import javax.servlet.ServletException;
^
EmployeeAction.java:3: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
EmployeeAction.java:14: cannot find symbol
symbol : class HttpServletRequest
location: class org.EmployeeAction
public ActionForward perform (ActionMapping mappings,ActionForm form,HttpServletRequest req, HttpServletResponse res)throws ServletException,IOException{
^
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The jars are in your current directory?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to compile my struts files in command prompt
 
Similar Threads
Struts 2 application on Linux ( Ubuntu 11.x) platform through command prompt
Java cant find source file
compiling ActionForm,ActionClass from command prompt,
can't find information in property"access" in a bean of type 'ministry.LoginBeans'
EJB Compilation --- URGENT!!!!