An app I am working on needs to check the Java CLASSPATH (I am trying to return more useful errors if a call fails). The CLASSPATH is a Java property (kind of like environment variables) named java.class.path, and to obtain this value all you need to do is call getProperty() in java.lang.System. To make this simpler I through these two UDFs together, the first returns a structure of all Java properties and the second returns a specific property.
It is worth noting that to access a property with a . in its name you’ll need to use struct[“member”] syntax instead of struct.member. So this will work:
But this won’t:
Leave a Reply