Skip to Content
avatar image
Former Member

Extract java code from Web dynpro application's EAR

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 21, 2009 at 10:27 AM

    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.)

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • avatar image
    Former Member
    Jul 21, 2009 at 10:35 AM

    you can get the workspace structure back

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 21, 2009 at 11:30 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 22, 2009 at 07:09 AM

    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

    Add comment
    10|10000 characters needed characters exceeded