private InputStream findNextBestProfile(Generation systemGeneration, String javaEdition, Version javaVersion, String embeddedProfileName) { InputStream result = null; int minor = javaVersion.getMinor(); do { result = findInSystemBundle(systemGeneration, javaEdition + embeddedProfileName + javaVersion.getMajor() + "." + minor + PROFILE_EXT); //$NON-NLS-1$ minor = minor - 1; } while (result == null && minor > 0); return result; }
private InputStream findNextBestProfile(Generation systemGeneration, String javaEdition, Version javaVersion, String embeddedProfileName) { InputStream result = null; int minor = javaVersion.getMinor(); do { result = findInSystemBundle(systemGeneration, javaEdition + embeddedProfileName + javaVersion.getMajor() + "." + minor + PROFILE_EXT); //$NON-NLS-1$ minor = minor - 1; } while (result == null && minor > 0); return result; }
private Properties readConfiguredJavaProfile(Generation systemGeneration) { // check for the java profile property for a url String propJavaProfile = equinoxContainer.getConfiguration().getConfiguration(EquinoxConfiguration.PROP_OSGI_JAVA_PROFILE); if (propJavaProfile != null) { InputStream profileIn = null; try { // we assume a URL profileIn = new URL(propJavaProfile).openStream(); } catch (IOException e) { // try using a relative path in the system bundle profileIn = findInSystemBundle(systemGeneration, propJavaProfile); } if (profileIn != null) { Properties result = new Properties(); try { result.load(new BufferedInputStream(profileIn)); } catch (IOException e) { // consider logging } finally { try { profileIn.close(); } catch (IOException e) { // nothing to do } } return result; } } return null; }
private Properties readConfiguredJavaProfile(Generation systemGeneration) { // check for the java profile property for a url String propJavaProfile = equinoxContainer.getConfiguration().getConfiguration(EquinoxConfiguration.PROP_OSGI_JAVA_PROFILE); if (propJavaProfile != null) { InputStream profileIn = null; try { // we assume a URL profileIn = new URL(propJavaProfile).openStream(); } catch (IOException e) { // try using a relative path in the system bundle profileIn = findInSystemBundle(systemGeneration, propJavaProfile); } if (profileIn != null) { Properties result = new Properties(); try { result.load(new BufferedInputStream(profileIn)); } catch (IOException e) { // consider logging } finally { try { profileIn.close(); } catch (IOException e) { // nothing to do } } return result; } } return null; }
private InputStream findNextBestProfile(Generation systemGeneration, String javaEdition, Version javaVersion, String embeddedProfileName) { InputStream result = null; int major = javaVersion.getMajor(); int minor = javaVersion.getMinor(); do { // If minor is zero then it is not included in the name String profileResourceName = javaEdition + embeddedProfileName + major + ((minor > 0) ? "." + minor : "") + PROFILE_EXT; //$NON-NLS-1$ //$NON-NLS-2$ result = findInSystemBundle(systemGeneration, profileResourceName); if (minor > 0) { minor -= 1; } else if (major > 9) { major -= 1; } else if (major <= 9 && major > 1) { minor = 8; major = 1; } } while (result == null && minor >= 0); return result; }
private InputStream findNextBestProfile(Generation systemGeneration, String javaEdition, Version javaVersion, String embeddedProfileName) { InputStream result = null; int major = javaVersion.getMajor(); int minor = javaVersion.getMinor(); do { // If minor is zero then it is not included in the name String profileResourceName = javaEdition + embeddedProfileName + major + ((minor > 0) ? "." + minor : "") + PROFILE_EXT; //$NON-NLS-1$ //$NON-NLS-2$ result = findInSystemBundle(systemGeneration, profileResourceName); if (minor > 0) { minor -= 1; } else if (major > 9) { major -= 1; } else if (major <= 9 && major > 1) { minor = 8; major = 1; } } while (result == null && minor >= 0); return result; }
private InputStream findNextBestProfile(Generation systemGeneration, String javaEdition, Version javaVersion, String embeddedProfileName) { InputStream result = null; int major = javaVersion.getMajor(); int minor = javaVersion.getMinor(); do { // If minor is zero then it is not included in the name String profileResourceName = javaEdition + embeddedProfileName + major + ((minor > 0) ? "." + minor : "") + PROFILE_EXT; //$NON-NLS-1$ //$NON-NLS-2$ result = findInSystemBundle(systemGeneration, profileResourceName); if (minor > 0) { minor -= 1; } else if (major > 9) { major -= 1; } else if (major <= 9 && major > 1) { minor = 8; major = 1; } else { // we have reached the end of our search; return the existing result; return result; } } while (result == null && minor >= 0); return result; }
private InputStream findNextBestProfile(Generation systemGeneration, String javaEdition, Version javaVersion, String embeddedProfileName) { InputStream result = null; int major = javaVersion.getMajor(); int minor = javaVersion.getMinor(); do { // If minor is zero then it is not included in the name String profileResourceName = javaEdition + embeddedProfileName + major + ((minor > 0) ? "." + minor : "") + PROFILE_EXT; //$NON-NLS-1$ //$NON-NLS-2$ result = findInSystemBundle(systemGeneration, profileResourceName); if (minor > 0) { minor -= 1; } else if (major > 9) { major -= 1; } else if (major <= 9 && major > 1) { minor = 8; major = 1; } else { // we have reached the end of our search; return the existing result; return result; } } while (result == null && minor >= 0); return result; }
profileIn = findInSystemBundle(systemGeneration, javaProfile); if (profileIn == null) profileIn = getNextBestProfile(systemGeneration, JAVASE, runtimeVersion, embeddedProfileName); profileIn = findInSystemBundle(systemGeneration, "JavaSE-1.7.profile"); //$NON-NLS-1$ if (profileIn != null) { try {
} catch (IOException e) { profileIn = findInSystemBundle(systemGeneration, propJavaProfile); profileIn = findInSystemBundle(systemGeneration, javaProfile); if (profileIn == null) profileIn = getNextBestProfile(systemGeneration, javaEdition, javaVersion, embeddedProfileName); profileIn = findInSystemBundle(systemGeneration, "JavaSE-1.6.profile"); //$NON-NLS-1$ if (profileIn != null) { try {
} catch (IOException e) { profileIn = findInSystemBundle(systemGeneration, propJavaProfile); profileIn = findInSystemBundle(systemGeneration, javaProfile); if (profileIn == null) profileIn = getNextBestProfile(systemGeneration, javaEdition, javaVersion, embeddedProfileName); profileIn = findInSystemBundle(systemGeneration, "JavaSE-1.6.profile"); //$NON-NLS-1$ if (profileIn != null) { try {
profileIn = findInSystemBundle(systemGeneration, javaProfile); if (profileIn == null) profileIn = getNextBestProfile(systemGeneration, JAVASE, runtimeVersion, embeddedProfileName); profileIn = findInSystemBundle(systemGeneration, "JavaSE-1.7.profile"); //$NON-NLS-1$ if (profileIn != null) { try {
} catch (IOException e) { profileIn = findInSystemBundle(systemGeneration, propJavaProfile); profileIn = findInSystemBundle(systemGeneration, javaProfile); if (profileIn == null) profileIn = getNextBestProfile(systemGeneration, javaEdition, javaVersion, embeddedProfileName); profileIn = findInSystemBundle(systemGeneration, "JavaSE-1.6.profile"); //$NON-NLS-1$ if (profileIn != null) { try {
} catch (IOException e) { profileIn = findInSystemBundle(systemGeneration, propJavaProfile); profileIn = findInSystemBundle(systemGeneration, javaProfile); if (profileIn == null) profileIn = getNextBestProfile(systemGeneration, javaEdition, javaVersion, embeddedProfileName); profileIn = findInSystemBundle(systemGeneration, "JavaSE-1.6.profile"); //$NON-NLS-1$ if (profileIn != null) { try {