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 Executing a program in an ear file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Executing a program in an ear file" Watch "Executing a program in an ear file" New topic
Author

Executing a program in an ear file

Barry Brashear
Ranch Hand

Joined: Jun 05, 2001
Posts: 303
I have an ear file that contains a jar which contains the entry point program. Call it myProgram.class. How can I set up a bat file to execute
myProgram?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13868
    
  10

EAR files (Enterprise ARchive) normally contain Java EE applications that you need to deploy on a Java EE application server. Do you have a JAR file inside your EAR file that contains a standalone Java application?

EAR files are really just JAR files. So you can use the JAR utility to look inside them and extract files from them.

You'll need to extract the JAR file from the EAR, and run the application using the extracted JAR file. You can't directly run an application that's inside a JAR file inside an EAR file.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Executing a program in an ear file
 
Similar Threads
j2ee
Websphere 7.0 in Myeclipse Blue
Is it possible to create an eclipse project from an existing EAR file?
Creating .ear file from zip file
ServletContext