From: Otmar H. <otm...@us...> - 2006-04-04 22:56:32
|
Update of /cvsroot/jython/installer/src/java/org/python/util/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12615/src/java/org/python/util/install Modified Files: JavaSelectionPageValidator.java Log Message: do external java version checking only when needed Index: JavaSelectionPageValidator.java =================================================================== RCS file: /cvsroot/jython/installer/src/java/org/python/util/install/JavaSelectionPageValidator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JavaSelectionPageValidator.java 20 Mar 2006 21:56:03 -0000 1.1 --- JavaSelectionPageValidator.java 4 Apr 2006 22:56:27 -0000 1.2 *************** *** 17,25 **** String directory = _page.getJavaHome().getText().trim(); // trim to be sure File javaHome = new File(directory); ! JavaVersionInfo javaVersionInfo = Installation.getExternalJavaVersion(javaHome); ! if (javaVersionInfo.getErrorCode() != Installation.NORMAL_RETURN) { ! throw new ValidationException(javaVersionInfo.getReason()); } ! FrameInstaller.setTargetJavaHome(directory); FrameInstaller.setJavaVersionInfo(javaVersionInfo); } --- 17,33 ---- String directory = _page.getJavaHome().getText().trim(); // trim to be sure File javaHome = new File(directory); ! JavaVersionInfo javaVersionInfo = new JavaVersionInfo(); ! String currentJavaHomeName = System.getProperty(JavaVersionTester.JAVA_HOME); ! if (currentJavaHomeName.equals(javaHome.getAbsolutePath())) { ! // no experiments if current java is selected ! Installation.fillJavaVersionInfo(javaVersionInfo, System.getProperties()); ! javaHome = new File(currentJavaHomeName); ! } else { ! javaVersionInfo = Installation.getExternalJavaVersion(javaHome); ! if (javaVersionInfo.getErrorCode() != Installation.NORMAL_RETURN) { ! throw new ValidationException(javaVersionInfo.getReason()); ! } } ! FrameInstaller.setTargetJavaHome(javaHome.getAbsolutePath()); FrameInstaller.setJavaVersionInfo(javaVersionInfo); } |