Java 3D Desktop Environment旨在使用Java 3D来创建一个3D桌面环境。功能包括:分布式的应用程序
源代码在线查看: applicationhelper.java
package org.j3de.util;
import java.rmi.Naming;
import java.rmi.RemoteException;
import org.j3de.exception.ExceptionHandler;
import org.j3de.interfaces.Application;
import org.j3de.interfaces.ApplicationEnvironment;
import org.j3de.interfaces.ApplicationServer;
public class ApplicationHelper {
/* Needs better Exception Handling ! */
public static Application getApplication(String url, ApplicationEnvironment appEnvironment) {
int i = url.indexOf("#");
String serverName = url.substring(0, i);
String applicationName = url.substring(i + 1);
System.out.println("Server Name : " + serverName); System.out.println("Application Name : " + applicationName);
try {
ApplicationServer appServer = (ApplicationServer)Naming.lookup(serverName);
return appServer.getApplication(applicationName, appEnvironment);
} catch (Exception e) {
ExceptionHandler.handleException(e);
return null;
}
}
}