on 2017 Mar 13 3:40 PM
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
Request clarification before answering.
Hi Abhishek,
You can decompile your '.class' file.
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.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhishek,
Yes, when you decompile your class file, you will get a source file but without any comments.
Of cource, you don't need to import a java file to your PI cos only class file is required at runtime. But I always put java and class files into my jar file to help other developers.
Regards,
Andrzej
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Please select 'Export Java source files and resources' checkbox when Exporting your Project in NWDS.
Reference: Change existing JAVA mapping using NWDS in SAP PI
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
21 | |
9 | |
8 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.