mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-07 16:49:10 +00:00
[TASK] Added class path redirect
This commit is contained in:
@@ -27,7 +27,10 @@ public class SystemRedirect {
|
|||||||
String value;
|
String value;
|
||||||
switch (s) {
|
switch (s) {
|
||||||
case "user.home":
|
case "user.home":
|
||||||
value = Directories.getHomeDir().getAbsolutePath();
|
value = Directories.getCachePath().getAbsolutePath();
|
||||||
|
break;
|
||||||
|
case "java.class.path":
|
||||||
|
value = ".";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
value = System.getProperty(s);
|
value = System.getProperty(s);
|
||||||
@@ -40,14 +43,20 @@ public class SystemRedirect {
|
|||||||
String value = null;
|
String value = null;
|
||||||
switch (s2) {
|
switch (s2) {
|
||||||
case "user.home":
|
case "user.home":
|
||||||
value = Directories.getHomeDir().getAbsolutePath();
|
value = Directories.getCachePath().getAbsolutePath();
|
||||||
|
break;
|
||||||
|
case "java.class.path":
|
||||||
|
value = ".";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
switch (s) {
|
switch (s) {
|
||||||
case "user.home":
|
case "user.home":
|
||||||
value = Directories.getHomeDir().getAbsolutePath();
|
value = Directories.getCachePath().getAbsolutePath();
|
||||||
|
break;
|
||||||
|
case "java.class.path":
|
||||||
|
value = ".";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
value = System.getProperty(s);
|
value = System.getProperty(s);
|
||||||
@@ -62,11 +71,12 @@ public class SystemRedirect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String setProperty(String s1, String s2) {
|
public static String setProperty(String s1, String s2) {
|
||||||
System.out.printf("SetSystemProp %s = %s", s1, s2);
|
System.out.printf("SetSystemProp %s = %s\n", s1, s2);
|
||||||
return System.setProperty(s1, s2);
|
return System.setProperty(s1, s2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getenv(String string) {
|
public static String getenv(String string) {
|
||||||
|
System.out.printf("getEnv %s = %s\n", string, System.getenv(string));
|
||||||
return System.getenv(string);
|
return System.getenv(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,7 +84,6 @@ public class SystemRedirect {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void setErr(PrintStream printStream) {
|
public static void setErr(PrintStream printStream) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user