private void initialize(IPublisherInfo publisherInfo) { this.info = publisherInfo; if (jreLocation != null) { File javaProfile = null; if (jreLocation.isDirectory()) { //Look for a JRE profile file to set version and capabilities File[] profiles = jreLocation.listFiles((FileFilter) pathname -> pathname.getAbsolutePath().endsWith(".profile")); //$NON-NLS-1$ if (profiles != null && profiles.length > 0) { javaProfile = profiles[0]; } } else if (jreLocation.isFile()) javaProfile = jreLocation; else // jreLocation file does not exist throw new IllegalArgumentException(NLS.bind(Messages.exception_nonExistingJreLocationFile, jreLocation.getAbsolutePath())); profileProperties = loadProfile(javaProfile); } if (profileProperties == null) { String profileFile = (environment != null ? environment : DEFAULT_PROFILE).replace('/', '_') + ".profile"; //$NON-NLS-1$ URL profileURL = getResouceFromSystemBundle(profileFile); profileProperties = loadProfile(profileURL); } }
private void initialize(IPublisherInfo publisherInfo) { this.info = publisherInfo; if (jreLocation != null) { File javaProfile = null; if (jreLocation.isDirectory()) { //Look for a JRE profile file to set version and capabilities File[] profiles = jreLocation.listFiles(new FileFilter() { public boolean accept(File pathname) { return pathname.getAbsolutePath().endsWith(".profile"); //$NON-NLS-1$ } }); if (profiles != null && profiles.length > 0) { javaProfile = profiles[0]; } } else if (jreLocation.isFile()) javaProfile = jreLocation; else // jreLocation file does not exist throw new IllegalArgumentException(NLS.bind(Messages.exception_nonExistingJreLocationFile, jreLocation.getAbsolutePath())); profileProperties = loadProfile(javaProfile); } if (profileProperties == null) { String profileFile = (environment != null ? environment : DEFAULT_PROFILE).replace('/', '_') + ".profile"; //$NON-NLS-1$ URL profileURL = getResouceFromSystemBundle(profileFile); profileProperties = loadProfile(profileURL); } }
private void initialize(IPublisherInfo publisherInfo) { this.info = publisherInfo; if (jreLocation != null) { File javaProfile = null; if (jreLocation.isDirectory()) { //Look for a JRE profile file to set version and capabilities File[] profiles = jreLocation.listFiles(new FileFilter() { public boolean accept(File pathname) { return pathname.getAbsolutePath().endsWith(".profile"); //$NON-NLS-1$ } }); if (profiles != null && profiles.length > 0) { javaProfile = profiles[0]; } } else if (jreLocation.isFile()) javaProfile = jreLocation; else // jreLocation file does not exist throw new IllegalArgumentException(NLS.bind(Messages.exception_nonExistingJreLocationFile, jreLocation.getAbsolutePath())); profileProperties = loadProfile(javaProfile); } if (profileProperties == null) { String profileFile = (environment != null ? environment : DEFAULT_PROFILE).replace('/', '_') + ".profile"; //$NON-NLS-1$ URL profileURL = getResouceFromSystemBundle(profileFile); profileProperties = loadProfile(profileURL); } }