cancel
Showing results for 
Search instead for 
Did you mean: 

Extract java code from Web dynpro application's EAR

Former Member

Hi,

Is it posiible to extract java code from a web dynpro aplication's .ear file.

Considering that i dont have the worksapce for the application but i have the ear. So it possible that i create a workspace with this ear and get the code.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You need to decompile to get java code. No need for workspace.

An ear file is a jar file.

A jar file contains files. There can be any type of file in a jar file. That includes other jar files. But there can be class files, media files, text files, anything.

Search for class files. You would need to use a decompiler on each class file (once you find it.)

Former Member
0 Kudos

Hi Aishwarya,

Thanks for replying. So, are you saying that it is not possible to get the worspace back with the ear. Only the java code can be obtained by decompilation of the class file.

former_member192434
Active Contributor
0 Kudos

Hi

An Enterprise ARchive, or EAR, is a file format used by Java EE for packaging one or more modules into a single archive so that the deployment of the various modules onto an application server happens simultaneously and coherently. It also contains XML files called deployment descriptors which describe how to deploy the modules. Maven or Ant can be used to build EAR files.

once you extract the ear file u will get this

1 File Structure

1.1 Modules

1.2 Class isolation

1.3 META-INF directory

I hope that will help

Thanks

Answers (4)

Answers (4)

0 Kudos

It should be possible. The easiest way is to use online Java Decompiler.

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi Deepika

Sometimes in non-productive EARs you may see a source code. Check if file src.zip presents in the EAR's root folder. If you have the file then you can extract it directly in Eclipse Webdynpro project and work with the project.

In other case what you can extract from EAR are compiled binary Java classes (*.class). You cannot restore any project from the compiled classes. The only what you can do in the case is to decompile file-by-file each Java class with help of JAD tool, for example, or any other Java decompiler.

BR, Sergei

Former Member
0 Kudos

once you open your .ear file using winrar or winzip...you will be able to see the workspace structure..

if you extract using same you can see the structure

Former Member
0 Kudos

you can get the workspace structure back

Former Member
0 Kudos

How do i get the workspace structure back?