📄 environmenthelper.java
字号:
package org.j3de.util;
import java.rmi.Naming;
import java.rmi.RemoteException;
import org.j3de.exception.ExceptionHandler;
import org.j3de.interfaces.Environment;
import org.j3de.interfaces.EnvironmentServer;
public class EnvironmentHelper {
/* Needs better Exception Handling ! */
public static Environment getEnvironment(String url) {
int i = url.indexOf("#");
String serverName = url.substring(0, i);
String environmentName = url.substring(i + 1);
System.out.println("Server Name : " + serverName);
System.out.println("Environment Name : " + environmentName);
try {
EnvironmentServer envServer = (EnvironmentServer)Naming.lookup(serverName);
return envServer.getEnvironment(environmentName);
} catch (Exception e) {
ExceptionHandler.handleException(e);
return null;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -