/** * Constructs a {@link JavaHome} given a specified string. * * @param javaHome the {@link Platform} specific Java Home * * @return the {@link JavaHome} */ public static JavaHome at(String javaHome) { return new JavaHome(javaHome); } }
@Override public Properties getEnvironmentVariables(Platform platform, OptionsByType optionsByType) { Properties properties = super.getEnvironmentVariables(platform, optionsByType); // ----- establish the java home ----- JavaHome javaHome = optionsByType.get(JavaHome.class); if (javaHome != null) { properties.put("JAVA_HOME", javaHome.get()); } return properties; }
String javaHomePath = javaHome.get().trim();
/** * Constructs a {@link JavaHome} given a specified string. * * @param javaHome the {@link Platform} specific Java Home * * @return the {@link JavaHome} */ public static JavaHome at(String javaHome) { return new JavaHome(javaHome); } }