diff --git a/portal-impl/src/com/liferay/portal/license/util/LicenseUtil.java b/portal-impl/src/com/liferay/portal/license/util/LicenseUtil.java
index 3827e6c5f969358a860d9295553858d2242d0033..89c0988c10ae06afb24916c125d588ac3e256ec4 100644
--- a/portal-impl/src/com/liferay/portal/license/util/LicenseUtil.java
+++ b/portal-impl/src/com/liferay/portal/license/util/LicenseUtil.java
@@ -24,6 +24,7 @@ import com.liferay.portal.kernel.json.JSONFactoryUtil;
 import com.liferay.portal.kernel.json.JSONObject;
 import com.liferay.portal.kernel.log.Log;
 import com.liferay.portal.kernel.log.LogFactoryUtil;
+import com.liferay.portal.kernel.util.ArrayUtil;
 import com.liferay.portal.kernel.util.Base64;
 import com.liferay.portal.kernel.util.CharPool;
 import com.liferay.portal.kernel.util.Constants;
@@ -69,8 +70,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.TreeMap;
 import java.util.concurrent.TimeUnit;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 
 import javax.crypto.KeyGenerator;
 
@@ -156,142 +155,11 @@ public class LicenseUtil {
 	}
 
 	public static Set<String> getIpAddresses() {
-		if (_ipAddresses != null) {
-			return new HashSet<String>(_ipAddresses);
-		}
-
-		_ipAddresses = new HashSet<String>();
-
-		try {
-			List<NetworkInterface> networkInterfaces = Collections.list(
-				NetworkInterface.getNetworkInterfaces());
-
-			for (NetworkInterface networkInterface : networkInterfaces) {
-				List<InetAddress> inetAddresses = Collections.list(
-					networkInterface.getInetAddresses());
-
-				for (InetAddress inetAddress : inetAddresses) {
-					if (inetAddress.isLinkLocalAddress() ||
-						inetAddress.isLoopbackAddress() ||
-						!(inetAddress instanceof Inet4Address)) {
-
-						continue;
-					}
-
-					_ipAddresses.add(inetAddress.getHostAddress());
-				}
-			}
-		}
-		catch (Exception e) {
-			_log.error("Unable to read local server's IP addresses");
-
-			_log.error(e, e);
-		}
-
-		return new HashSet<String>(_ipAddresses);
+		return _ipAddresses;
 	}
 
 	public static Set<String> getMacAddresses() {
-		if (_macAddresses != null) {
-			return new HashSet<String>(_macAddresses);
-		}
-
-		Set<String> macAddresses = new HashSet<String>();
-
-		String osName = System.getProperty("os.name");
-
-		String executable = null;
-		String arguments = null;
-
-		if (StringUtil.startsWith(osName, "win")) {
-			executable = "ipconfig";
-			arguments = "/all";
-		}
-		else {
-			if (StringUtil.startsWith(osName, "aix")) {
-				executable = "netstat";
-				arguments = "-ina";
-			}
-			else {
-				executable = "ifconfig";
-				arguments = "-a";
-			}
-
-			File sbinDir = new File("/sbin", executable);
-
-			if (sbinDir.exists()) {
-				executable = "/sbin/".concat(executable);
-			}
-		}
-
-		try {
-			Runtime runtime = Runtime.getRuntime();
-
-			Process process = runtime.exec(
-				new String[] {executable, arguments});
-
-			macAddresses = getMacAddresses(osName, process.getInputStream());
-		}
-		catch (Exception e) {
-			_log.error(e, e);
-		}
-
-		_macAddresses = macAddresses;
-
-		return new HashSet<String>(macAddresses);
-	}
-
-	public static Set<String> getMacAddresses(
-			String osName, InputStream processInputStream)
-		throws Exception {
-
-		Set<String> macAddresses = new HashSet<String>();
-
-		Pattern macAddressPattern = _macAddressPattern1;
-
-		if (StringUtil.startsWith(osName, "aix")) {
-			macAddressPattern = _macAddressPattern2;
-		}
-
-		String processOutput = StringUtil.read(processInputStream);
-
-		String[] lines = StringUtil.split(processOutput, CharPool.NEW_LINE);
-
-		for (String line : lines) {
-			Matcher matcher = macAddressPattern.matcher(line);
-
-			if (!matcher.find()) {
-				continue;
-			}
-
-			String macAddress = matcher.group(1);
-
-			macAddress = StringUtil.toLowerCase(macAddress);
-			macAddress = macAddress.replace(CharPool.DASH, CharPool.COLON);
-			macAddress = macAddress.replace(CharPool.PERIOD, CharPool.COLON);
-
-			StringBuilder sb = new StringBuilder(17);
-
-			sb.append(macAddress);
-
-			for (int i = 1; i < 5; ++i) {
-				int pos = (i * 3) - 1;
-
-				if (sb.charAt(pos) != CharPool.COLON) {
-					sb.insert((i - 1) * 3, CharPool.NUMBER_0);
-				}
-			}
-
-			if (sb.length() < 17) {
-				sb.insert(15, CharPool.NUMBER_0);
-			}
-
-			macAddress = sb.toString();
-
-			macAddresses.add(macAddress);
-		}
-
-		return macAddresses;
+		return _macAddresses;
 	}
 
 	public static byte[] getServerIdBytes() throws Exception {
@@ -592,6 +460,74 @@ public class LicenseUtil {
 		return jsonObject.toString().getBytes(StringPool.UTF8);
 	}
 
+	private static Set<String> _getIPAddresses() {
+		Set<String> ipAddresses = new HashSet<String>();
+
+		try {
+			List<NetworkInterface> networkInterfaces = Collections.list(
+				NetworkInterface.getNetworkInterfaces());
+
+			for (NetworkInterface networkInterface : networkInterfaces) {
+				List<InetAddress> inetAddresses = Collections.list(
+					networkInterface.getInetAddresses());
+
+				for (InetAddress inetAddress : inetAddresses) {
+					if (inetAddress.isLinkLocalAddress() ||
+						inetAddress.isLoopbackAddress() ||
+						!(inetAddress instanceof Inet4Address)) {
+
+						continue;
+					}
+
+					ipAddresses.add(inetAddress.getHostAddress());
+				}
+			}
+		}
+		catch (Exception e) {
+			_log.error("Unable to read local server's IP addresses", e);
+		}
+
+		return ipAddresses;
+	}
+
+	private static Set<String> _getMACAddresses() {
+		Set<String> macAddresses = new HashSet<String>();
+
+		try {
+			List<NetworkInterface> networkInterfaces = Collections.list(
+				NetworkInterface.getNetworkInterfaces());
+
+			for (NetworkInterface networkInterface : networkInterfaces) {
+				byte[] hardwareAddress = networkInterface.getHardwareAddress();
+
+				if (ArrayUtil.isEmpty(hardwareAddress)) {
+					continue;
+				}
+
+				StringBuilder sb = new StringBuilder(
+					(hardwareAddress.length * 3) - 1);
+
+				String hexString = StringUtil.bytesToHexString(hardwareAddress);
+
+				for (int i = 0; i < hexString.length(); i += 2) {
+					if (i != 0) {
+						sb.append(CharPool.COLON);
+					}
+
+					sb.append(Character.toLowerCase(hexString.charAt(i)));
+					sb.append(Character.toLowerCase(hexString.charAt(i + 1)));
+				}
+
+				macAddresses.add(sb.toString());
+			}
+		}
+		catch (Exception e) {
+			_log.error("Unable to read local server's MAC addresses", e);
+		}
+
+		return macAddresses;
+	}
+
 	private static Map<String, String> _getOrderProducts(
 		JSONObject jsonObject) {
 
@@ -700,12 +636,8 @@ public class LicenseUtil {
 	private static String _encryptedSymmetricKey;
 	private static MethodHandler _getServerInfoMethodHandler =
 		new MethodHandler(new MethodKey(LicenseUtil.class, "getServerInfo"));
-	private static Set<String> _ipAddresses;
-	private static Set<String> _macAddresses;
-	private static Pattern _macAddressPattern1 = Pattern.compile(
-		"\\s((\\p{XDigit}{1,2}(-|:)){5}(\\p{XDigit}{1,2}))(?:\\s|$)");
-	private static Pattern _macAddressPattern2 = Pattern.compile(
-		"\\s((\\p{XDigit}{1,2}(\\.)){5}(\\p{XDigit}{1,2}))(?:\\s|$)");
+	private static final Set<String> _ipAddresses;
+	private static final Set<String> _macAddresses;
 	private static MethodKey _registerOrderMethodKey = new MethodKey(
 		LicenseUtil.class, "registerOrder", String.class, String.class,
 		int.class);
@@ -714,6 +646,9 @@ public class LicenseUtil {
 
 	static {
 		_initKeys();
+
+		_ipAddresses = _getIPAddresses();
+		_macAddresses = _getMACAddresses();
 	}
 
 }
\ No newline at end of file
