diff --git a/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishMain.java b/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishMain.java index 1f9f2d5d1c5..0ea5ef8835b 100644 --- a/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishMain.java +++ b/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/GlassFishMain.java @@ -77,9 +77,13 @@ public static void main(final String[] args) { checkJdkVersion(); final Properties argsAsProps = argsToMap(args); - final OsgiPlatform platform = OsgiPlatform.valueOf(whichPlatform()); + final String platformName = whichPlatform(); + final OsgiPlatform platform = OsgiPlatform.valueOf(platformName); STDOUT.println("Launching GlassFish on " + platform + " platform"); + // Set the system property to allow downstream code to know the platform on which GlassFish runs. + System.setProperty(PLATFORM_PROPERTY_KEY, platformName); + final Path instanceRoot = findInstanceRoot(installRoot, argsAsProps); final ServerFiles files = new ServerFiles(installRoot.toPath(), instanceRoot); final StartupContextCfg startupContextCfg = createStartupContextCfg(platform, files, args);