File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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

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
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15093

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 8 API documentation
I agree. Here's the link:
subject: Executing a program in an ear file
It's not a secret anymore!