File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes run a java application from .war file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "run a java application from .war file" Watch "run a java application from .war file" New topic
Author

run a java application from .war file

sangeeta choudhari
Greenhorn

Joined: Mar 10, 2005
Posts: 1
Hi,

I have a scenrio in which I need to run a java application (main) packaged in a .war file.

Is there any way I can run the application from command prompt.



thanks in advance,
sangeeta
Annie Smith
Ranch Hand

Joined: Mar 05, 2005
Posts: 172
You should be able to do it if you have the WAR in the ClassPath


Cheers!<br /><b>Annie</b>
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

realize that a "war" file typically denotes a Web Application aRchive -- and is used to hold J2EE Web applications that are deployed to and executed from an application server.

a "jar" file typically denotes a Java Application aRchive -- and can be used to hold a J2SE application that you run from the command line, as Annie has shown.

I would think that its confusing if you give a customer a WAR file and tell them to execute it from the command line, instead of having it be deployed to an application server as would be expected of a WAR file. Basically -- I suggest you package your applicatino as a JAR.


- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: run a java application from .war file
 
Similar Threads
How to call external WAR file in J2EE Project using WSAD 5.1.1
Registering a Servlet at runtime
How to get this directory into my classpath?
.war file and the WebLogic 6.0
Is there a java diff tool?