Question

I created a Java application, and I want to put it into an EAR to be uploaded to Websphere Application Server and start it. It's not a web project, it's a java application project only.

I heard that maybe with EJB I could, can someone please help me on this?

No correct solution

OTHER TIPS

I suggest you to use your IDE to export an enterprise application project into an EAR file.

If you are using Eclipse then you can follow these steps:

  1. In the Java™ EE perspective, click File > Export.
  2. Under Select an export destination, click J2EE > EAR file, and then click Next.
  3. In the EAR project list, select the enterprise application project you want to export.
  4. In the Destination field, enter the full path and EAR file name where you want to export the enterprise application project that is selected in the EAR application field.
  5. Optional: To export source files, select the Export source files check box.
  6. Optional: If you are exporting to an existing EAR file and you do not want to be warned about overwriting it, select the Overwrite existing file check box.
  7. Click Finish.

The wizard exports the contents of the EAR project to the specified EAR file. Additionally, for each project that corresponds to a module or utility JAR in the application, the project contents are exported into a nested module or JAR file in the EAR file. If any unsaved changes exist on any of the files in any of the referenced projects, you are prompted to save these files prior to export.

Maven is the build tool of choice for many people due to the simplicity and flexibility of use. The real strength of Maven is vetted when handling real complex projetcs consisting of tens of modules, each requiring elaborate build requirements.

There are some URL, introduction how to create ear package.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top