Solved

Extract EAR file into a Eclipse Project

Posted on 2010-11-22
9
3,810 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
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 about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

815 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now