Solved

Extract EAR file into a Eclipse Project

Posted on 2010-11-22
9
4,681 Views
Last Modified: 2012-05-10
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
Comment
Question by:abooysen2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34186798
jar xvf earfile

import from file system into your project
0
 

Author Comment

by:abooysen2
ID: 34187081
must I only import the ear file ?
0
 
LVL 11

Expert Comment

by:Manish
ID: 34190655
In Eclipse,
Import Ear file through
File>Import > Java EE > Ear file.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 17

Expert Comment

by:sweetfa2
ID: 34191269
the jar command extracts the components of the ear to the file system.  You then import the components.

0
 

Author Comment

by:abooysen2
ID: 34194422
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
 
LVL 11

Expert Comment

by:Manish
ID: 34194735
I think you will be able to run the project.
After importing you will be able to see the structure.


0
 

Author Comment

by:abooysen2
ID: 34195877
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
 
LVL 11

Accepted Solution

by:
Manish earned 125 total points
ID: 34196392
You dont have source code of this project?

To convert *class to *java, you need decompiler like jad.
0
 

Author Closing Comment

by:abooysen2
ID: 34203084
Thanks it's working 100%
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question