Read system property in a Java class

This entry is part of the Maximo Java Development series.

Here is a small piece of Java code that can be used to retrieve a system property in Java.

Properties configData = MXServer.getMXServer().getConfig();
String prop = configData.getProperty("mxe.adminEmail");

Replace mxe.adminEmail with your property.

Comments