Removed java classpath configuration.
This commit is contained in:
parent
988fc150ac
commit
8b77a39aaf
@ -1,14 +1,11 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Script Engine Settings
|
||||
# ---------------------------------------------------------------------------
|
||||
# Properties retrieved with System.getProperty(String) can be used as values
|
||||
# by enclosing the property name with %. Eg.: %java.class.path%
|
||||
|
||||
# The parent class loader for isolated script class loaders.
|
||||
# When this property is not specified, has an invalid value or is a class name which could not be found, the System classloader is used.
|
||||
# Values: System, ThreadContext or a fully qualified java class name
|
||||
# Values: System, ThreadContext or a fully qualified java class name.
|
||||
classloader=System
|
||||
#classloader=ThreadContext
|
||||
|
||||
# Source compatibility.
|
||||
source=1.8
|
||||
@ -16,8 +13,5 @@ source=1.8
|
||||
# The java sourcepath, when you have a different datapack root, you must change this too.
|
||||
sourcepath=data/scripts
|
||||
|
||||
# The java classpath.
|
||||
cp=%java.class.path%
|
||||
|
||||
# The debug informations to generate for compiled class files.
|
||||
g=source,lines,vars
|
@ -51,10 +51,6 @@ public final class JavaExecutionContext extends JavaScriptingEngine
|
||||
// Set options.
|
||||
addOptionIfNotNull(_options, getProperty("source"), "-source");
|
||||
addOptionIfNotNull(_options, getProperty("sourcepath"), "-sourcepath");
|
||||
if (!addOptionIfNotNull(_options, getProperty("cp"), "-cp") && !addOptionIfNotNull(_options, getProperty("classpath"), "-classpath"))
|
||||
{
|
||||
addOptionIfNotNull(_options, System.getProperty("java.class.path"), "-cp");
|
||||
}
|
||||
addOptionIfNotNull(_options, getProperty("g"), "-g:");
|
||||
|
||||
// We always set the target JVM to the current running version.
|
||||
|
@ -52,15 +52,7 @@ public class JavaScriptingEngine
|
||||
// Set properties.
|
||||
for (Entry<Object, Object> prop : props.entrySet())
|
||||
{
|
||||
String key = (String) prop.getKey();
|
||||
String value = (String) prop.getValue();
|
||||
|
||||
if (value.startsWith("%") && value.endsWith("%"))
|
||||
{
|
||||
value = System.getProperty(value.substring(1, value.length() - 1));
|
||||
}
|
||||
|
||||
_properties.put(key, value);
|
||||
_properties.put((String) prop.getKey(), (String) prop.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,11 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Script Engine Settings
|
||||
# ---------------------------------------------------------------------------
|
||||
# Properties retrieved with System.getProperty(String) can be used as values
|
||||
# by enclosing the property name with %. Eg.: %java.class.path%
|
||||
|
||||
# The parent class loader for isolated script class loaders.
|
||||
# When this property is not specified, has an invalid value or is a class name which could not be found, the System classloader is used.
|
||||
# Values: System, ThreadContext or a fully qualified java class name
|
||||
# Values: System, ThreadContext or a fully qualified java class name.
|
||||
classloader=System
|
||||
#classloader=ThreadContext
|
||||
|
||||
# Source compatibility.
|
||||
source=1.8
|
||||
@ -16,8 +13,5 @@ source=1.8
|
||||
# The java sourcepath, when you have a different datapack root, you must change this too.
|
||||
sourcepath=data/scripts
|
||||
|
||||
# The java classpath.
|
||||
cp=%java.class.path%
|
||||
|
||||
# The debug informations to generate for compiled class files.
|
||||
g=source,lines,vars
|
@ -51,10 +51,6 @@ public final class JavaExecutionContext extends JavaScriptingEngine
|
||||
// Set options.
|
||||
addOptionIfNotNull(_options, getProperty("source"), "-source");
|
||||
addOptionIfNotNull(_options, getProperty("sourcepath"), "-sourcepath");
|
||||
if (!addOptionIfNotNull(_options, getProperty("cp"), "-cp") && !addOptionIfNotNull(_options, getProperty("classpath"), "-classpath"))
|
||||
{
|
||||
addOptionIfNotNull(_options, System.getProperty("java.class.path"), "-cp");
|
||||
}
|
||||
addOptionIfNotNull(_options, getProperty("g"), "-g:");
|
||||
|
||||
// We always set the target JVM to the current running version.
|
||||
|
@ -52,15 +52,7 @@ public class JavaScriptingEngine
|
||||
// Set properties.
|
||||
for (Entry<Object, Object> prop : props.entrySet())
|
||||
{
|
||||
String key = (String) prop.getKey();
|
||||
String value = (String) prop.getValue();
|
||||
|
||||
if (value.startsWith("%") && value.endsWith("%"))
|
||||
{
|
||||
value = System.getProperty(value.substring(1, value.length() - 1));
|
||||
}
|
||||
|
||||
_properties.put(key, value);
|
||||
_properties.put((String) prop.getKey(), (String) prop.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,11 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Script Engine Settings
|
||||
# ---------------------------------------------------------------------------
|
||||
# Properties retrieved with System.getProperty(String) can be used as values
|
||||
# by enclosing the property name with %. Eg.: %java.class.path%
|
||||
|
||||
# The parent class loader for isolated script class loaders.
|
||||
# When this property is not specified, has an invalid value or is a class name which could not be found, the System classloader is used.
|
||||
# Values: System, ThreadContext or a fully qualified java class name
|
||||
# Values: System, ThreadContext or a fully qualified java class name.
|
||||
classloader=System
|
||||
#classloader=ThreadContext
|
||||
|
||||
# Source compatibility.
|
||||
source=1.8
|
||||
@ -16,8 +13,5 @@ source=1.8
|
||||
# The java sourcepath, when you have a different datapack root, you must change this too.
|
||||
sourcepath=data/scripts
|
||||
|
||||
# The java classpath.
|
||||
cp=%java.class.path%
|
||||
|
||||
# The debug informations to generate for compiled class files.
|
||||
g=source,lines,vars
|
@ -51,10 +51,6 @@ public final class JavaExecutionContext extends JavaScriptingEngine
|
||||
// Set options.
|
||||
addOptionIfNotNull(_options, getProperty("source"), "-source");
|
||||
addOptionIfNotNull(_options, getProperty("sourcepath"), "-sourcepath");
|
||||
if (!addOptionIfNotNull(_options, getProperty("cp"), "-cp") && !addOptionIfNotNull(_options, getProperty("classpath"), "-classpath"))
|
||||
{
|
||||
addOptionIfNotNull(_options, System.getProperty("java.class.path"), "-cp");
|
||||
}
|
||||
addOptionIfNotNull(_options, getProperty("g"), "-g:");
|
||||
|
||||
// We always set the target JVM to the current running version.
|
||||
|
@ -52,15 +52,7 @@ public class JavaScriptingEngine
|
||||
// Set properties.
|
||||
for (Entry<Object, Object> prop : props.entrySet())
|
||||
{
|
||||
String key = (String) prop.getKey();
|
||||
String value = (String) prop.getValue();
|
||||
|
||||
if (value.startsWith("%") && value.endsWith("%"))
|
||||
{
|
||||
value = System.getProperty(value.substring(1, value.length() - 1));
|
||||
}
|
||||
|
||||
_properties.put(key, value);
|
||||
_properties.put((String) prop.getKey(), (String) prop.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,11 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Script Engine Settings
|
||||
# ---------------------------------------------------------------------------
|
||||
# Properties retrieved with System.getProperty(String) can be used as values
|
||||
# by enclosing the property name with %. Eg.: %java.class.path%
|
||||
|
||||
# The parent class loader for isolated script class loaders.
|
||||
# When this property is not specified, has an invalid value or is a class name which could not be found, the System classloader is used.
|
||||
# Values: System, ThreadContext or a fully qualified java class name
|
||||
# Values: System, ThreadContext or a fully qualified java class name.
|
||||
classloader=System
|
||||
#classloader=ThreadContext
|
||||
|
||||
# Source compatibility.
|
||||
source=1.8
|
||||
@ -16,8 +13,5 @@ source=1.8
|
||||
# The java sourcepath, when you have a different datapack root, you must change this too.
|
||||
sourcepath=data/scripts
|
||||
|
||||
# The java classpath.
|
||||
cp=%java.class.path%
|
||||
|
||||
# The debug informations to generate for compiled class files.
|
||||
g=source,lines,vars
|
@ -51,10 +51,6 @@ public final class JavaExecutionContext extends JavaScriptingEngine
|
||||
// Set options.
|
||||
addOptionIfNotNull(_options, getProperty("source"), "-source");
|
||||
addOptionIfNotNull(_options, getProperty("sourcepath"), "-sourcepath");
|
||||
if (!addOptionIfNotNull(_options, getProperty("cp"), "-cp") && !addOptionIfNotNull(_options, getProperty("classpath"), "-classpath"))
|
||||
{
|
||||
addOptionIfNotNull(_options, System.getProperty("java.class.path"), "-cp");
|
||||
}
|
||||
addOptionIfNotNull(_options, getProperty("g"), "-g:");
|
||||
|
||||
// We always set the target JVM to the current running version.
|
||||
|
@ -52,15 +52,7 @@ public class JavaScriptingEngine
|
||||
// Set properties.
|
||||
for (Entry<Object, Object> prop : props.entrySet())
|
||||
{
|
||||
String key = (String) prop.getKey();
|
||||
String value = (String) prop.getValue();
|
||||
|
||||
if (value.startsWith("%") && value.endsWith("%"))
|
||||
{
|
||||
value = System.getProperty(value.substring(1, value.length() - 1));
|
||||
}
|
||||
|
||||
_properties.put(key, value);
|
||||
_properties.put((String) prop.getKey(), (String) prop.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,11 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Script Engine Settings
|
||||
# ---------------------------------------------------------------------------
|
||||
# Properties retrieved with System.getProperty(String) can be used as values
|
||||
# by enclosing the property name with %. Eg.: %java.class.path%
|
||||
|
||||
# The parent class loader for isolated script class loaders.
|
||||
# When this property is not specified, has an invalid value or is a class name which could not be found, the System classloader is used.
|
||||
# Values: System, ThreadContext or a fully qualified java class name
|
||||
# Values: System, ThreadContext or a fully qualified java class name.
|
||||
classloader=System
|
||||
#classloader=ThreadContext
|
||||
|
||||
# Source compatibility.
|
||||
source=1.8
|
||||
@ -16,8 +13,5 @@ source=1.8
|
||||
# The java sourcepath, when you have a different datapack root, you must change this too.
|
||||
sourcepath=data/scripts
|
||||
|
||||
# The java classpath.
|
||||
cp=%java.class.path%
|
||||
|
||||
# The debug informations to generate for compiled class files.
|
||||
g=source,lines,vars
|
@ -51,10 +51,6 @@ public final class JavaExecutionContext extends JavaScriptingEngine
|
||||
// Set options.
|
||||
addOptionIfNotNull(_options, getProperty("source"), "-source");
|
||||
addOptionIfNotNull(_options, getProperty("sourcepath"), "-sourcepath");
|
||||
if (!addOptionIfNotNull(_options, getProperty("cp"), "-cp") && !addOptionIfNotNull(_options, getProperty("classpath"), "-classpath"))
|
||||
{
|
||||
addOptionIfNotNull(_options, System.getProperty("java.class.path"), "-cp");
|
||||
}
|
||||
addOptionIfNotNull(_options, getProperty("g"), "-g:");
|
||||
|
||||
// We always set the target JVM to the current running version.
|
||||
|
@ -52,15 +52,7 @@ public class JavaScriptingEngine
|
||||
// Set properties.
|
||||
for (Entry<Object, Object> prop : props.entrySet())
|
||||
{
|
||||
String key = (String) prop.getKey();
|
||||
String value = (String) prop.getValue();
|
||||
|
||||
if (value.startsWith("%") && value.endsWith("%"))
|
||||
{
|
||||
value = System.getProperty(value.substring(1, value.length() - 1));
|
||||
}
|
||||
|
||||
_properties.put(key, value);
|
||||
_properties.put((String) prop.getKey(), (String) prop.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,11 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Script Engine Settings
|
||||
# ---------------------------------------------------------------------------
|
||||
# Properties retrieved with System.getProperty(String) can be used as values
|
||||
# by enclosing the property name with %. Eg.: %java.class.path%
|
||||
|
||||
# The parent class loader for isolated script class loaders.
|
||||
# When this property is not specified, has an invalid value or is a class name which could not be found, the System classloader is used.
|
||||
# Values: System, ThreadContext or a fully qualified java class name
|
||||
# Values: System, ThreadContext or a fully qualified java class name.
|
||||
classloader=System
|
||||
#classloader=ThreadContext
|
||||
|
||||
# Source compatibility.
|
||||
source=1.8
|
||||
@ -16,8 +13,5 @@ source=1.8
|
||||
# The java sourcepath, when you have a different datapack root, you must change this too.
|
||||
sourcepath=data/scripts
|
||||
|
||||
# The java classpath.
|
||||
cp=%java.class.path%
|
||||
|
||||
# The debug informations to generate for compiled class files.
|
||||
g=source,lines,vars
|
@ -51,10 +51,6 @@ public final class JavaExecutionContext extends JavaScriptingEngine
|
||||
// Set options.
|
||||
addOptionIfNotNull(_options, getProperty("source"), "-source");
|
||||
addOptionIfNotNull(_options, getProperty("sourcepath"), "-sourcepath");
|
||||
if (!addOptionIfNotNull(_options, getProperty("cp"), "-cp") && !addOptionIfNotNull(_options, getProperty("classpath"), "-classpath"))
|
||||
{
|
||||
addOptionIfNotNull(_options, System.getProperty("java.class.path"), "-cp");
|
||||
}
|
||||
addOptionIfNotNull(_options, getProperty("g"), "-g:");
|
||||
|
||||
// We always set the target JVM to the current running version.
|
||||
|
@ -52,15 +52,7 @@ public class JavaScriptingEngine
|
||||
// Set properties.
|
||||
for (Entry<Object, Object> prop : props.entrySet())
|
||||
{
|
||||
String key = (String) prop.getKey();
|
||||
String value = (String) prop.getValue();
|
||||
|
||||
if (value.startsWith("%") && value.endsWith("%"))
|
||||
{
|
||||
value = System.getProperty(value.substring(1, value.length() - 1));
|
||||
}
|
||||
|
||||
_properties.put(key, value);
|
||||
_properties.put((String) prop.getKey(), (String) prop.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,11 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Script Engine Settings
|
||||
# ---------------------------------------------------------------------------
|
||||
# Properties retrieved with System.getProperty(String) can be used as values
|
||||
# by enclosing the property name with %. Eg.: %java.class.path%
|
||||
|
||||
# The parent class loader for isolated script class loaders.
|
||||
# When this property is not specified, has an invalid value or is a class name which could not be found, the System classloader is used.
|
||||
# Values: System, ThreadContext or a fully qualified java class name
|
||||
# Values: System, ThreadContext or a fully qualified java class name.
|
||||
classloader=System
|
||||
#classloader=ThreadContext
|
||||
|
||||
# Source compatibility.
|
||||
source=1.8
|
||||
@ -16,8 +13,5 @@ source=1.8
|
||||
# The java sourcepath, when you have a different datapack root, you must change this too.
|
||||
sourcepath=data/scripts
|
||||
|
||||
# The java classpath.
|
||||
cp=%java.class.path%
|
||||
|
||||
# The debug informations to generate for compiled class files.
|
||||
g=source,lines,vars
|
@ -51,10 +51,6 @@ public final class JavaExecutionContext extends JavaScriptingEngine
|
||||
// Set options.
|
||||
addOptionIfNotNull(_options, getProperty("source"), "-source");
|
||||
addOptionIfNotNull(_options, getProperty("sourcepath"), "-sourcepath");
|
||||
if (!addOptionIfNotNull(_options, getProperty("cp"), "-cp") && !addOptionIfNotNull(_options, getProperty("classpath"), "-classpath"))
|
||||
{
|
||||
addOptionIfNotNull(_options, System.getProperty("java.class.path"), "-cp");
|
||||
}
|
||||
addOptionIfNotNull(_options, getProperty("g"), "-g:");
|
||||
|
||||
// We always set the target JVM to the current running version.
|
||||
|
@ -52,15 +52,7 @@ public class JavaScriptingEngine
|
||||
// Set properties.
|
||||
for (Entry<Object, Object> prop : props.entrySet())
|
||||
{
|
||||
String key = (String) prop.getKey();
|
||||
String value = (String) prop.getValue();
|
||||
|
||||
if (value.startsWith("%") && value.endsWith("%"))
|
||||
{
|
||||
value = System.getProperty(value.substring(1, value.length() - 1));
|
||||
}
|
||||
|
||||
_properties.put(key, value);
|
||||
_properties.put((String) prop.getKey(), (String) prop.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,11 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Script Engine Settings
|
||||
# ---------------------------------------------------------------------------
|
||||
# Properties retrieved with System.getProperty(String) can be used as values
|
||||
# by enclosing the property name with %. Eg.: %java.class.path%
|
||||
|
||||
# The parent class loader for isolated script class loaders.
|
||||
# When this property is not specified, has an invalid value or is a class name which could not be found, the System classloader is used.
|
||||
# Values: System, ThreadContext or a fully qualified java class name
|
||||
# Values: System, ThreadContext or a fully qualified java class name.
|
||||
classloader=System
|
||||
#classloader=ThreadContext
|
||||
|
||||
# Source compatibility.
|
||||
source=1.8
|
||||
@ -16,8 +13,5 @@ source=1.8
|
||||
# The java sourcepath, when you have a different datapack root, you must change this too.
|
||||
sourcepath=data/scripts
|
||||
|
||||
# The java classpath.
|
||||
cp=%java.class.path%
|
||||
|
||||
# The debug informations to generate for compiled class files.
|
||||
g=source,lines,vars
|
@ -51,10 +51,6 @@ public final class JavaExecutionContext extends JavaScriptingEngine
|
||||
// Set options.
|
||||
addOptionIfNotNull(_options, getProperty("source"), "-source");
|
||||
addOptionIfNotNull(_options, getProperty("sourcepath"), "-sourcepath");
|
||||
if (!addOptionIfNotNull(_options, getProperty("cp"), "-cp") && !addOptionIfNotNull(_options, getProperty("classpath"), "-classpath"))
|
||||
{
|
||||
addOptionIfNotNull(_options, System.getProperty("java.class.path"), "-cp");
|
||||
}
|
||||
addOptionIfNotNull(_options, getProperty("g"), "-g:");
|
||||
|
||||
// We always set the target JVM to the current running version.
|
||||
|
@ -52,15 +52,7 @@ public class JavaScriptingEngine
|
||||
// Set properties.
|
||||
for (Entry<Object, Object> prop : props.entrySet())
|
||||
{
|
||||
String key = (String) prop.getKey();
|
||||
String value = (String) prop.getValue();
|
||||
|
||||
if (value.startsWith("%") && value.endsWith("%"))
|
||||
{
|
||||
value = System.getProperty(value.substring(1, value.length() - 1));
|
||||
}
|
||||
|
||||
_properties.put(key, value);
|
||||
_properties.put((String) prop.getKey(), (String) prop.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,11 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Script Engine Settings
|
||||
# ---------------------------------------------------------------------------
|
||||
# Properties retrieved with System.getProperty(String) can be used as values
|
||||
# by enclosing the property name with %. Eg.: %java.class.path%
|
||||
|
||||
# The parent class loader for isolated script class loaders.
|
||||
# When this property is not specified, has an invalid value or is a class name which could not be found, the System classloader is used.
|
||||
# Values: System, ThreadContext or a fully qualified java class name
|
||||
# Values: System, ThreadContext or a fully qualified java class name.
|
||||
classloader=System
|
||||
#classloader=ThreadContext
|
||||
|
||||
# Source compatibility.
|
||||
source=1.8
|
||||
@ -16,8 +13,5 @@ source=1.8
|
||||
# The java sourcepath, when you have a different datapack root, you must change this too.
|
||||
sourcepath=data/scripts
|
||||
|
||||
# The java classpath.
|
||||
cp=%java.class.path%
|
||||
|
||||
# The debug informations to generate for compiled class files.
|
||||
g=source,lines,vars
|
@ -51,10 +51,6 @@ public final class JavaExecutionContext extends JavaScriptingEngine
|
||||
// Set options.
|
||||
addOptionIfNotNull(_options, getProperty("source"), "-source");
|
||||
addOptionIfNotNull(_options, getProperty("sourcepath"), "-sourcepath");
|
||||
if (!addOptionIfNotNull(_options, getProperty("cp"), "-cp") && !addOptionIfNotNull(_options, getProperty("classpath"), "-classpath"))
|
||||
{
|
||||
addOptionIfNotNull(_options, System.getProperty("java.class.path"), "-cp");
|
||||
}
|
||||
addOptionIfNotNull(_options, getProperty("g"), "-g:");
|
||||
|
||||
// We always set the target JVM to the current running version.
|
||||
|
@ -52,15 +52,7 @@ public class JavaScriptingEngine
|
||||
// Set properties.
|
||||
for (Entry<Object, Object> prop : props.entrySet())
|
||||
{
|
||||
String key = (String) prop.getKey();
|
||||
String value = (String) prop.getValue();
|
||||
|
||||
if (value.startsWith("%") && value.endsWith("%"))
|
||||
{
|
||||
value = System.getProperty(value.substring(1, value.length() - 1));
|
||||
}
|
||||
|
||||
_properties.put(key, value);
|
||||
_properties.put((String) prop.getKey(), (String) prop.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,11 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Script Engine Settings
|
||||
# ---------------------------------------------------------------------------
|
||||
# Properties retrieved with System.getProperty(String) can be used as values
|
||||
# by enclosing the property name with %. Eg.: %java.class.path%
|
||||
|
||||
# The parent class loader for isolated script class loaders.
|
||||
# When this property is not specified, has an invalid value or is a class name which could not be found, the System classloader is used.
|
||||
# Values: System, ThreadContext or a fully qualified java class name
|
||||
# Values: System, ThreadContext or a fully qualified java class name.
|
||||
classloader=System
|
||||
#classloader=ThreadContext
|
||||
|
||||
# Source compatibility.
|
||||
source=1.8
|
||||
@ -16,8 +13,5 @@ source=1.8
|
||||
# The java sourcepath, when you have a different datapack root, you must change this too.
|
||||
sourcepath=data/scripts
|
||||
|
||||
# The java classpath.
|
||||
cp=%java.class.path%
|
||||
|
||||
# The debug informations to generate for compiled class files.
|
||||
g=source,lines,vars
|
@ -51,10 +51,6 @@ public final class JavaExecutionContext extends JavaScriptingEngine
|
||||
// Set options.
|
||||
addOptionIfNotNull(_options, getProperty("source"), "-source");
|
||||
addOptionIfNotNull(_options, getProperty("sourcepath"), "-sourcepath");
|
||||
if (!addOptionIfNotNull(_options, getProperty("cp"), "-cp") && !addOptionIfNotNull(_options, getProperty("classpath"), "-classpath"))
|
||||
{
|
||||
addOptionIfNotNull(_options, System.getProperty("java.class.path"), "-cp");
|
||||
}
|
||||
addOptionIfNotNull(_options, getProperty("g"), "-g:");
|
||||
|
||||
// We always set the target JVM to the current running version.
|
||||
|
@ -52,15 +52,7 @@ public class JavaScriptingEngine
|
||||
// Set properties.
|
||||
for (Entry<Object, Object> prop : props.entrySet())
|
||||
{
|
||||
String key = (String) prop.getKey();
|
||||
String value = (String) prop.getValue();
|
||||
|
||||
if (value.startsWith("%") && value.endsWith("%"))
|
||||
{
|
||||
value = System.getProperty(value.substring(1, value.length() - 1));
|
||||
}
|
||||
|
||||
_properties.put(key, value);
|
||||
_properties.put((String) prop.getKey(), (String) prop.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,11 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Script Engine Settings
|
||||
# ---------------------------------------------------------------------------
|
||||
# Properties retrieved with System.getProperty(String) can be used as values
|
||||
# by enclosing the property name with %. Eg.: %java.class.path%
|
||||
|
||||
# The parent class loader for isolated script class loaders.
|
||||
# When this property is not specified, has an invalid value or is a class name which could not be found, the System classloader is used.
|
||||
# Values: System, ThreadContext or a fully qualified java class name
|
||||
# Values: System, ThreadContext or a fully qualified java class name.
|
||||
classloader=System
|
||||
#classloader=ThreadContext
|
||||
|
||||
# Source compatibility.
|
||||
source=1.8
|
||||
@ -16,8 +13,5 @@ source=1.8
|
||||
# The java sourcepath, when you have a different datapack root, you must change this too.
|
||||
sourcepath=data/scripts
|
||||
|
||||
# The java classpath.
|
||||
cp=%java.class.path%
|
||||
|
||||
# The debug informations to generate for compiled class files.
|
||||
g=source,lines,vars
|
@ -51,10 +51,6 @@ public final class JavaExecutionContext extends JavaScriptingEngine
|
||||
// Set options.
|
||||
addOptionIfNotNull(_options, getProperty("source"), "-source");
|
||||
addOptionIfNotNull(_options, getProperty("sourcepath"), "-sourcepath");
|
||||
if (!addOptionIfNotNull(_options, getProperty("cp"), "-cp") && !addOptionIfNotNull(_options, getProperty("classpath"), "-classpath"))
|
||||
{
|
||||
addOptionIfNotNull(_options, System.getProperty("java.class.path"), "-cp");
|
||||
}
|
||||
addOptionIfNotNull(_options, getProperty("g"), "-g:");
|
||||
|
||||
// We always set the target JVM to the current running version.
|
||||
|
@ -52,15 +52,7 @@ public class JavaScriptingEngine
|
||||
// Set properties.
|
||||
for (Entry<Object, Object> prop : props.entrySet())
|
||||
{
|
||||
String key = (String) prop.getKey();
|
||||
String value = (String) prop.getValue();
|
||||
|
||||
if (value.startsWith("%") && value.endsWith("%"))
|
||||
{
|
||||
value = System.getProperty(value.substring(1, value.length() - 1));
|
||||
}
|
||||
|
||||
_properties.put(key, value);
|
||||
_properties.put((String) prop.getKey(), (String) prop.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,11 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
# Script Engine Settings
|
||||
# ---------------------------------------------------------------------------
|
||||
# Properties retrieved with System.getProperty(String) can be used as values
|
||||
# by enclosing the property name with %. Eg.: %java.class.path%
|
||||
|
||||
# The parent class loader for isolated script class loaders.
|
||||
# When this property is not specified, has an invalid value or is a class name which could not be found, the System classloader is used.
|
||||
# Values: System, ThreadContext or a fully qualified java class name
|
||||
# Values: System, ThreadContext or a fully qualified java class name.
|
||||
classloader=System
|
||||
#classloader=ThreadContext
|
||||
|
||||
# Source compatibility.
|
||||
source=1.8
|
||||
@ -16,8 +13,5 @@ source=1.8
|
||||
# The java sourcepath, when you have a different datapack root, you must change this too.
|
||||
sourcepath=data/scripts
|
||||
|
||||
# The java classpath.
|
||||
cp=%java.class.path%
|
||||
|
||||
# The debug informations to generate for compiled class files.
|
||||
g=source,lines,vars
|
@ -51,10 +51,6 @@ public final class JavaExecutionContext extends JavaScriptingEngine
|
||||
// Set options.
|
||||
addOptionIfNotNull(_options, getProperty("source"), "-source");
|
||||
addOptionIfNotNull(_options, getProperty("sourcepath"), "-sourcepath");
|
||||
if (!addOptionIfNotNull(_options, getProperty("cp"), "-cp") && !addOptionIfNotNull(_options, getProperty("classpath"), "-classpath"))
|
||||
{
|
||||
addOptionIfNotNull(_options, System.getProperty("java.class.path"), "-cp");
|
||||
}
|
||||
addOptionIfNotNull(_options, getProperty("g"), "-g:");
|
||||
|
||||
// We always set the target JVM to the current running version.
|
||||
|
@ -52,15 +52,7 @@ public class JavaScriptingEngine
|
||||
// Set properties.
|
||||
for (Entry<Object, Object> prop : props.entrySet())
|
||||
{
|
||||
String key = (String) prop.getKey();
|
||||
String value = (String) prop.getValue();
|
||||
|
||||
if (value.startsWith("%") && value.endsWith("%"))
|
||||
{
|
||||
value = System.getProperty(value.substring(1, value.length() - 1));
|
||||
}
|
||||
|
||||
_properties.put(key, value);
|
||||
_properties.put((String) prop.getKey(), (String) prop.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user