• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Executing a program in an ear file

 
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic