initialize

This commit is contained in:
Pruefer
2025-06-06 09:15:13 +02:00
commit fa7c2730f1
5817 changed files with 1339670 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
package com.itac.mes.datainterface;
public class DataInterfaceWithGuiWebstartLauncher {
public static void main(String[] args) {
try {
System.setProperty("itac.mainclass", "com.itac.mes.datainterface.DataInterfaceWithGui");
setSystemProperties(args[0]);
com.itac.mes.datainterface.DataInterfaceWithGui.main(new String[]{});
} catch(Exception e) {
throw new RuntimeException("Unable to execute com.itac.mes.datainterface.DataInterfaceWithGui.main()", e);
}
}
private static void setSystemProperties(String complete) {
boolean isEscape = false;
boolean isValue = false;
StringBuilder key = new StringBuilder();
StringBuilder value = new StringBuilder();
for (int i=0; i<complete.length(); i++) {
char c = complete.charAt(i);
if (c == ',') {
if (isEscape) {
if (isValue) {
value.append(c);
} else {
key.append(c);
}
isEscape = false;
} else {
System.setProperty(key.toString(), value.toString());
key = new StringBuilder();
value = new StringBuilder();
isEscape = false;
isValue = false;
}
} else if (c == '\\') {
if (isEscape) {
if (isValue) {
value.append(c);
} else {
key.append(c);
}
isEscape = false;
} else {
isEscape = true;
}
} else if (c == '=') {
isValue = true;
} else {
if (isValue) {
value.append(c);
} else {
key.append(c);
}
}
}
System.setProperty(key.toString(), value.toString());
}
}