Solved

Extract EAR file into a Eclipse Project

Posted on 2010-11-22
9
4,157 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
  • 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
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 
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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
tomcat administrtor 12 68
throw exception 21 66
String array comparison 4 45
Eclipse Java import and method not resolved 4 73
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

685 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