|
@@ -5,12 +5,15 @@
|
|
|
package de.nplusc.izc.iZtools.launcher;
|
|
|
|
|
|
import de.nplusc.izc.tools.IOtools.FileTK;
|
|
|
+import de.nplusc.izc.tools.baseTools.Tools;
|
|
|
import java.io.File;
|
|
|
import java.io.IOException;
|
|
|
import java.lang.reflect.Method;
|
|
|
import java.net.URISyntaxException;
|
|
|
import java.net.URL;
|
|
|
import java.net.URLClassLoader;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.prefs.Preferences;
|
|
|
|
|
|
/**
|
|
@@ -39,7 +42,7 @@ public class iZlaunchCore
|
|
|
*/
|
|
|
public static void addFile(File f) throws IOException {
|
|
|
addURL(f.toURI().toURL());
|
|
|
- System.err.println(f.getAbsolutePath());
|
|
|
+ System.err.println("loading"+f.getAbsolutePath());
|
|
|
}//end method
|
|
|
|
|
|
/**
|
|
@@ -91,7 +94,7 @@ public class iZlaunchCore
|
|
|
}
|
|
|
String[] cfgfile = FileTK.fileload(jarschpfad+"\\iZlaunch.cfg");
|
|
|
//System.out.println(new File("iZlaunch.cfg").getAbsolutePath());
|
|
|
-
|
|
|
+ System.out.println("jarfolder = "+jarschpfad);
|
|
|
String updootpath = new File(FileTK.getFilePath(jarschpfad+"\\"+cfgfile[0])+ "\\"+cfgfile[2]).getAbsolutePath();
|
|
|
String oldfile = new File(FileTK.getFilePath(jarschpfad+"\\"+cfgfile[0])+"\\old.jar.back").getAbsolutePath();
|
|
|
|
|
@@ -113,7 +116,13 @@ public class iZlaunchCore
|
|
|
f.renameTo(new File(jarschpfad+"\\"+cfgfile[0]));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ ArrayList<String> l = new ArrayList<>();
|
|
|
+ l.add("java");
|
|
|
+ l.add("-jar");
|
|
|
+ l.add(jarschpfad+"\\"+cfgfile[0]);
|
|
|
+ l.addAll(Arrays.asList(args));
|
|
|
+ Tools.runCmdWithPassthru(System.out, l.toArray(args));
|
|
|
+ /*
|
|
|
//die eingepflanzte jarsch laden
|
|
|
//Netbeans du bist nervig :(
|
|
|
addFile(jarschpfad+"\\"+cfgfile[0]);
|
|
@@ -121,7 +130,7 @@ public class iZlaunchCore
|
|
|
Class clazz = sysloader.loadClass(cfgfile[1]);
|
|
|
Method method = clazz.getMethod("main",String[].class);
|
|
|
method.setAccessible(true);
|
|
|
- method.invoke(null, (Object) args);//lädt die class::main//null=!!!!!!
|
|
|
+ method.invoke(null, (Object) args);//lädt die class::main//null=!!!!!!*/
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|