From 04f36305779195105c9986a9b16077561c09e7b4 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Thu, 20 Jun 2024 21:20:07 -0400 Subject: [PATCH] Fixing the installer in the empty disk case --- lib/src/main/java/com/commonwealthrobotics/JvmManager.java | 2 +- .../com/commonwealthrobotics/LatestFromGithubLaunchUI.java | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/src/main/java/com/commonwealthrobotics/JvmManager.java b/lib/src/main/java/com/commonwealthrobotics/JvmManager.java index 6360d12..00380ad 100644 --- a/lib/src/main/java/com/commonwealthrobotics/JvmManager.java +++ b/lib/src/main/java/com/commonwealthrobotics/JvmManager.java @@ -50,7 +50,7 @@ public class JvmManager { public static String getCommandString(String project, String repo, String version, String downloadJsonURL, long sizeOfJson, ProgressBar progress, String bindir) throws Exception { if(version==null) - throw new RuntimeException("Version can not be null"); + version="0.0.1"; File exe; exe= download(version, downloadJsonURL, sizeOfJson, progress, bindir, "jvm.json"); diff --git a/lib/src/main/java/com/commonwealthrobotics/LatestFromGithubLaunchUI.java b/lib/src/main/java/com/commonwealthrobotics/LatestFromGithubLaunchUI.java index 81933ad..0c9e123 100644 --- a/lib/src/main/java/com/commonwealthrobotics/LatestFromGithubLaunchUI.java +++ b/lib/src/main/java/com/commonwealthrobotics/LatestFromGithubLaunchUI.java @@ -308,9 +308,12 @@ void initialize() { } } if(!noInternet) { - if (myVersionString.contentEquals(latestVersionString)) { + if(myVersionString==null) launchApplication(); - } + else + if (myVersionString.contentEquals(latestVersionString)) { + launchApplication(); + } }else onNo(null);