Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5421
  • Last Modified:

Extract EAR file into a Eclipse Project

HI Expert
I have a ear file that I want to inport into Eclipse and start checking out the Code and run the project on my local machine. Question is is possible to do?

The ear contains
META-INF
name1.jar
name2.jar
name3.war


0
abooysen2
Asked:
abooysen2
  • 4
  • 3
  • 2
1 Solution
 
sweetfa2Commented:
jar xvf earfile

import from file system into your project
0
 
abooysen2Author Commented:
must I only import the ear file ?
0
 
ManishLeadCommented:
In Eclipse,
Import Ear file through
File>Import > Java EE > Ear file.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
sweetfa2Commented:
the jar command extracts the components of the ear to the file system.  You then import the components.

0
 
abooysen2Author Commented:
Hi karanw
Sorry for not understanding correctly but when U import the ear file that contains the jar's and war will it line out in a proper project structure?
0
 
ManishLeadCommented:
I think you will be able to run the project.
After importing you will be able to see the structure.


0
 
abooysen2Author Commented:
Thanks karanw I have imported the ear file and saw the structure we have 2 jars and on war file and the Ear file that contains the application.xml let me give you a break down of the application.xml file

Now looking at the account-ejb->ImportedClasses folder is are all the packages with it's classes with ext *.class and not *.java.
 Now can I have to get the classes back to ext *.java and make changes and ensure that the ear will be updated.


<application>
    <display-name>DealApp</display-name>
    <description>Application description</description>
    <module id="EjbModule_1290506961748">
        <ejb>deal-ejb.jar</ejb>
    </module>
    
    <module id="EjbModule_1290506961779">
        <ejb>account-ejb.jar</ejb>
    </module>
  
   
    <module id="WebModule_1290506961795">
        <web>
            <web-uri>web-client.war</web-uri>
            <context-root>mmticket</context-root>
        </web>
    </module>
    <security-role>
            <role-name>MMuser</role-name>
    </security-role>
    
    


    
</application>

Open in new window

0
 
ManishLeadCommented:
You dont have source code of this project?

To convert *class to *java, you need decompiler like jad.
0
 
abooysen2Author Commented:
Thanks it's working 100%
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now