Checking Java version only after getdown.txt has been re-fetched.
Typical use case is a security patch, were a new java patch (java_windows.jar) is put on server side and java_min_version updated accordingly in getdown.txt Currently the new virtual machine will be downloaded only after a second getdown launch. This pull request fixes this.
This commit is contained in:
@@ -400,21 +400,6 @@ public abstract class Getdown extends Thread
|
||||
|
||||
//setStep(Step.START);
|
||||
for (int ii = 0; ii < MAX_LOOPS; ii++) {
|
||||
// if we aren't running in a JVM that meets our version requirements, either
|
||||
// complain or attempt to download and install the appropriate version
|
||||
if (!_app.haveValidJavaVersion()) {
|
||||
// download and install the necessary version of java, then loop back again and
|
||||
// reverify everything; if we can't download java; we'll throw an exception
|
||||
log.info("Attempting to update Java VM...");
|
||||
setStep(Step.UPDATE_JAVA);
|
||||
_enableTracking = true; // always track JVM downloads
|
||||
try {
|
||||
updateJava();
|
||||
} finally {
|
||||
_enableTracking = false;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// make sure we have the desired version and that the metadata files are valid...
|
||||
setStep(Step.VERIFY_METADATA);
|
||||
@@ -462,6 +447,22 @@ public abstract class Getdown extends Thread
|
||||
// now we'll loop back and try it all again
|
||||
continue;
|
||||
}
|
||||
|
||||
// if we aren't running in a JVM that meets our version requirements, either
|
||||
// complain or attempt to download and install the appropriate version
|
||||
if (!_app.haveValidJavaVersion()) {
|
||||
// download and install the necessary version of java, then loop back again and
|
||||
// reverify everything; if we can't download java; we'll throw an exception
|
||||
log.info("Attempting to update Java VM...");
|
||||
setStep(Step.UPDATE_JAVA);
|
||||
_enableTracking = true; // always track JVM downloads
|
||||
try {
|
||||
updateJava();
|
||||
} finally {
|
||||
_enableTracking = false;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// if we were downloaded in full from another service (say, Steam), we may
|
||||
// not have unpacked all of our resources yet
|
||||
|
||||
Reference in New Issue
Block a user