Java 3D Desktop Environment旨在使用Java 3D来创建一个3D桌面环境。功能包括:分布式的应用程序

源代码在线查看: applicationhelper.java

软件大小: 1221 K
上传用户: lilacky
关键词: Java Environment Desktop 3D
下载地址: 免注册下载 普通下载 VIP

相关代码

				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;
				    }     
				  }
				}			

相关资源