Skip to Content

Imported Archive

Hi SDNites,

I have an imported archive which is used for JAVA mapping. This imported archive comprises of,

1. .Class

2. .Classpath

3. .project

In the past whenever I have created Java mapping it contains .JAVA and .CLASS which are created as I have imported .JAR files in PI system. Can you please help me with below 2 queries,

1. How are the above 3 files created when imported in SAP PI and does not have .JAVA files.

2. Where can I find source code in the above as it lies in .JAVA. I have see inside .Classpath and there are quite a few paths present but not sure ifI am looking into the right place to get .JAVA source code.

Regards,

Abhi

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Mar 14, 2017 at 04:54 PM

    Hi Abhishek,

    You can decompile your '.class' file.

    Decompile Java Mapping

    JD-GUI is a standalone graphical utility that displays Java source codes of “.class” files. You can browse the reconstructed source code with the JD-GUI for instant access to methods and fields.

    JD-GUI

    Regards,

    Nabendu.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 13, 2017 at 04:14 PM

    Please select 'Export Java source files and resources' checkbox when Exporting your Project in NWDS.

    /wp-content/uploads/2014/04/17_441900.png

    Reference: Change existing JAVA mapping using NWDS in SAP PI

    Regards,

    Nabendu.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 14, 2017 at 03:54 PM

    Hi Nabendu,

    Thanks for the helpful response.

    I have an existing mapping in which I can see only .class, .classpath and .project. I have to mke modifications in the mapping. I am trying to find the source code of it but not able to find its JAVA class. Can you please help me with that.

    Regards,

    Abhi

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Abhi,

      Could you check that your jar file contains any java files or not? You can change its extension from "jar" to "zip" (if it's necessary) and use any archive application (like WinZip, WinRar, etc).

      If you wouldn't be able to find java files, then you would have two options:

      1. you can try to find them somewhere else (a company source repository, developers, etc),

      2. you can try to decompile your class files.

      Regards,

      Andrzej

  • Mar 16, 2017 at 10:09 AM

    Hi Nabendu,

    Thanks for the helpful response.

    I am now able to decompile the .class files. Only difference that I have seen is that the comments of the code will be lost when you decompile using this approach. Please confirm.

    Also I noticed that the JAVA mapping works absolutely fine even without .JAVA files in Imported Archive. My understanding here is that we import both .JAVA and .CLASS file for easier maintenance of code. We can even live with .CLASS files in imported Archive without any issues.

    Regards,

    Abhishek

    Add comment
    10|10000 characters needed characters exceeded