aspose file tools*
The moose likes General Computing and the fly likes Is it possible to create an eclipse project from an existing EAR file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Is it possible to create an eclipse project from an existing EAR file?" Watch "Is it possible to create an eclipse project from an existing EAR file?" New topic
Author

Is it possible to create an eclipse project from an existing EAR file?

Jeffrey Cole
Greenhorn

Joined: Oct 07, 2003
Posts: 2
I have an ear file written a couple years ago on another computer. Is it possible to use this ear file (which contains the source) to generate a new eclipse project containing the ear contents? If so, how? TIA
Vijay Tidake
Ranch Hand

Joined: Nov 04, 2008
Posts: 146

Hi,

you can simple go to import menu of eclipse and import the ear file

1.browse ear
2.Select project
and 3.Select target runtime

Thanks


The important thing is not to stop questioning.Curiosity has its own reason for existing.
Jeffrey Cole
Greenhorn

Joined: Oct 07, 2003
Posts: 2
I tried that with no active project open. Eclipse complained that I had to have an open project to import into (I really want this created from the ear file, which has all the relevant info). I created an Enterprise Application project, and then imported an archive. It extracted the EAR file, but left the WAR file compressed, so clearly I am not making Eclipse understand what I need it to do.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5830
    
    7

Jeffrey Cole wrote:I have an ear file written a couple years ago on another computer. Is it possible to use this ear file (which contains the source) to generate a new eclipse project containing the ear contents? If so, how? TIA

You would have to manually extract those sources - Eclipse does not have any idea where to find them because there is no standard for storing sources in an EAR. The specs for an EAR file, and its embedded WAR and JAR files, does not specify any location for source files.

You can also extract the various configuration files.

Then create new projects in Eclipse and add the sources and config files to those projects. It is a completely manual process, but it can be done since you have the sources.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is it possible to create an eclipse project from an existing EAR file?