I need to programmatically get the properties of Infor M3 Enterprise Collaborator (MEC). How?
At some point I found com.intentia.ec.server.DocServer.getEcProperties(), but I do not remember if that worked or not.
I could not quickly find a solution, and eventually I found the Module MecUIServer’s Local Management Pages (ServerPropertiesPage):
I decompiled it, and I learned it uses com.lawson.ec.gridui.PropertiesSourceFactory.getInstance().getProperties():
So that’s the answer to get the MEC properties:
import java.util.Properties; import com.lawson.ec.gridui.PropertiesSourceFactory; Properties props = PropertiesSourceFactory.getInstance().getProperties(); props.getProperty("mec.central.file.path"); // D:/Infor/MECDEV
Remember to check for null.
I am now using the properties I need in my mappings and custom processes.
That’s it. Thanks for reading. Please subscribe, like, share.