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


abooysen2Asked:
Who is Participating?
 
ManishConnect With a Mentor LeadCommented:
You dont have source code of this project?

To convert *class to *java, you need decompiler like jad.
0
 
sweetfa2Commented:
jar xvf earfile

import from file system into your project
0
 
abooysen2Author Commented:
must I only import the ear file ?
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
ManishLeadCommented:
In Eclipse,
Import Ear file through
File>Import > Java EE > Ear file.
0
 
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
 
abooysen2Author Commented:
Thanks it's working 100%
0
All Courses

From novice to tech pro — start learning today.