Skip to Content

In SAP PI typical development projects, sometimes finding a SAP PI/PO java class jar file is a tedious job due to various reasons e.g., the jar file name might be changed in new PI version, jar file location change in pi server etc.. There are couple of good blogs on this topic on SCN (check references)

Well, this blog is just an extension to the wonderful blog concept: Finding com.sap.guid.IGUID (or any other class) on the PI Server by Markus Windhager

All that you have to do is, use below UDF code in a draft mapping program and then execute from test tab with required package class name as input. With this UDF procedure we can find any PI jar file location without much effort 😉

FindJarFileUDF code

** add import statement: java.net.URL


String str = "";
   try
   {
  //Class c = Class.forName("com.sap.guid.IGUID");
  Class c = Class.forName(var1);
  URL loc = c.getProtectionDomain().getCodeSource().getLocation();
  str = loc.toString();
  //audit.addAuditLogEntry(key, AuditLogStatus.SUCCESS, c + " found at " + loc);
    }catch (Exception e){
     str = e.toString();
    }
return str;




GM_FindJarFileUDF.jpg

Check results yourself and input your feedback 🙂


References

Finding com.sap.guid.IGUID (or any other class) on the PI Server by Markus Windhager

How to Find Java Library During PI Development  by William Li

How to Find Java Library Resource File Possessing Information for Class Name by Vadim Klimov

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply