explicit error if 32 bit java is used fix #6497

This commit is contained in:
rusefillc 2024-05-11 16:18:31 -04:00
parent 229958a80a
commit ab55d650b3
4 changed files with 21 additions and 2 deletions

View File

@ -29,6 +29,7 @@ Release template (copy/paste this for new release):
### Added
- new rusEFI console tab: Knock analyzer #6467
- Suzuki K6A (NON VVTI Trigger) #6490
- explicit error if 32 bit java is used #6497
### Fixed
- knock logic not activated until any configuration change via TS #6462

View File

@ -68,6 +68,10 @@ public enum FileLog {
return System.getProperty("os.name");
}
public static boolean is32bitJava() {
return System.getProperty("os.arch").contains("86");
}
public static boolean isWindows() {
return getOsName().contains("Windows");
}
@ -140,4 +144,4 @@ public enum FileLog {
}
log(e);
}
}
}

View File

@ -6,7 +6,7 @@ import java.net.URL;
import java.util.concurrent.atomic.AtomicReference;
public interface rusEFIVersion {
int CONSOLE_VERSION = 20240402;
int CONSOLE_VERSION = 20240511;
AtomicReference<String> firmwareVersion = new AtomicReference<>("N/A");
static long classBuildTimeMillis() {

View File

@ -136,6 +136,10 @@ public class ProgramSelector {
}
private void flashOpenBltCan(UpdateOperationCallbacks callbacks) {
if (FileLog.is32bitJava()) {
showError32bitJava();
return;
}
OpenbltJni.OpenbltCallbacks cb = makeOpenbltCallbacks(callbacks);
try {
@ -220,7 +224,17 @@ public class ProgramSelector {
};
}
private void showError32bitJava() {
JOptionPane.showMessageDialog(content, "64 bit java required. 32 bit java not supported!",
"Error", JOptionPane.ERROR_MESSAGE);
}
private void flashOpenbltSerialJni(String port, UpdateOperationCallbacks callbacks) {
if (FileLog.is32bitJava()) {
showError32bitJava();
return;
}
OpenbltJni.OpenbltCallbacks cb = makeOpenbltCallbacks(callbacks);
try {