本文整理了Java中org.nuxeo.common.Environment.setDefault()
方法的一些代码示例,展示了Environment.setDefault()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Environment.setDefault()
方法的具体详情如下:
包路径:org.nuxeo.common.Environment
类名称:Environment
方法名:setDefault
暂无
代码示例来源:origin: org.nuxeo.runtime/nuxeo-runtime-osgi
public NuxeoApp(File home, ClassLoader loader) {
this.loader = loader;
env = new Environment(home);
Environment.setDefault(env);
}
代码示例来源:origin: org.nuxeo.runtime/nuxeo-connect-standalone
public StandaloneUpdateService(Environment env) throws IOException {
// TODO NXP-9086: Add some checks on the environment
Environment.setDefault(env);
persistence = new PackagePersistence(this);
commands = new HashMap<>();
}
代码示例来源:origin: org.nuxeo.runtime/nuxeo-runtime-osgi
private static void doInitialize(Map<String, Object> hostEnv) {
boolean doPreprocessing = true;
String v = (String) hostEnv.get(PREPROCESSING);
if (v != null) {
doPreprocessing = Boolean.parseBoolean(v);
}
// build environment
Environment env = createEnvironment(home, hostEnv);
Environment.setDefault(env);
loadSystemProperties();
// start bundle pre-processing if requested
if (doPreprocessing) {
try {
preprocess();
} catch (RuntimeException e) {
throw new RuntimeException("Failed to run preprocessing", e);
}
}
}
代码示例来源:origin: org.nuxeo.runtime/nuxeo-runtime-osgi
public static StandaloneApplication createInstance(SharedClassLoader cl) throws IOException {
if (instance != null) {
throw new IllegalStateException("Application already instantiated");
}
// create application environment
Environment env = createEnvironment();
Environment.setDefault(env);
instance = new StandaloneApplication(cl, env);
String val = options.getOption("scanForNestedJARs");
if (val != null) {
StandaloneApplication.instance.scanForNestedJARs = Boolean.parseBoolean(val);
}
// hack to avoid deploying all jars in classpath as bundles
String javaLibsProp = System.getProperty("org.nuxeo.launcher.libdirs");
if (javaLibsProp != null) {
String[] ar = StringUtils.split(javaLibsProp, ',', false);
if (ar.length > 0) {
instance.libdirs = ar;
File wd = instance.getWorkingDir();
for (int i = 0; i < ar.length; i++) {
if (!ar[i].startsWith("/")) {
instance.libdirs[i] = new File(wd, ar[i]).getCanonicalFile().getAbsolutePath();
}
}
}
}
// end hack
return instance;
}
代码示例来源:origin: org.nuxeo.runtime/nuxeo-runtime-test
Environment.setDefault(null);
if (System.getProperties().remove("nuxeo.home") != null) {
log.warn("Removed System property nuxeo.home.");
内容来源于网络,如有侵权,请联系作者删除!