If we're running in the Digester, we need to and will see all of the
java_location properties (one for each supported platform), but if we're
running in a real installation, we'll only see the the one java_location that's
appropriate for our platform.
This initJava code gets called while we're in Digester mode, so it needs not to
crash when it sees multiple java_location entries.
When patching, Getdown will move foo.jar to foo.jar.old and then patch that
file to create a new foo.jar. That results in foo.jar.old being passed into
JarDiffPatcher as the source file, which it then inspects to determine whether
it is a zip file or a jar file based on its file extension. Since that file
extension has already changed to .xxx.old, we need to handle that.
Closes#230.
It is possible to use versioned mode without patch files, though there's no way
to specifically tell Getdown whether or not you are using patch files, so it
always tries to download them. If they don't exist, it should now log one
reasonable warning and then proceed to update based on resource hashes.
When set, it disables stdout/stderr redirection and uses java.exe on Windows so
that a console window is shown with output from the launched app.
This removes the use of a debug.txt file.
when bootstrapping into an empty directory with -Dappbase parameter, the version must be read first from the configuration in order to create a valid appbase after re-reading the just downloaded getdown.txt (in verisoned mode)
This revamps the way proxy handling is done to allow us to just proceed as
normal, and then if we get HTTP errors that indicate that we need a proxy or
need proxy credentials, we ask for them and then retry everything.
We still try to auto-detect the need for a proxy on our very first invocation
because on the first invocation, a failure to fetch a URL may well indicate
that a proxy is needed, but that same assumption does not hold on subsequent
invocations. In those later cases, it's probably just a transient network
failure and it would be weird and annoying to pop up the "please provide proxy
config" dialog in those cases.
Thanks pb00068 for getting this ball rolling, even though once again I have
nearly entirely rewritten the PR. I need to kick that habit. :)
What a horrible wart lingering from the early days of the Internet. Note to
future designers: please do not express configuration using a Turing complete
language.
Thanks jenriq for getting the ball rolling on this.
Closes#196.
Null tolerance is a plague. I wish `String` did not admit nulls and we had to
use Optional<String> for potentially null strings, but Java will forever be
cursed with the billion dollar mistake.