1 // Java 2 package hello; 3 4 public class Server 5 { 6 public static void main(String args[]) 7 { 8 java.util.Properties props = System.getProperties(); 9 props.put("org.omg.CORBA.ORBClass", "com.ooc.CORBA.ORB"); 10 props.put("org.omg.CORBA.ORBSingletonClass", 11 "com.ooc.CORBA.ORBSingleton"); 12 13 int status = 0; 14 org.omg.CORBA.ORB orb = null; 15 16 try 17 { 18 orb = org.omg.CORBA.ORB.init(args, props); 19 status = run(orb); 20 } 21 catch(Exception ex) 22 { 23 ex.printStackTrace(); 24 status = 1; 25 } 26 27 if(orb != null) 28 { 29 try 30 { 31 orb.destroy(); 32 } 33 catch(Exception ex) 34 { 35 ex.printStackTrace(); 36 status = 1; 37 } Getting Started 26 ORBacus 38 } 39 40 System.exit(status); 41 }