try {
// Create an ORB
ORB orb = ORB.init(argv, null);
// Get a reference to the Naming Service
org.omg.CORBA.Object obj =
orb.resolve_initial_references("NameService");
NamingContext nc = NamingContextHelper.narrow(obj);
// Get a reference to the Solver on the remote host
NameComponent comp = new NameComponent("Solver", "");
NameComponent path[] = {comp};
org.omg.CORBA.Object sobj = nc.resolve(path);
Solver solver = SolverHelper.narrow(sobj);
// Make a problem and ask the solver to solve it
ProblemSet s = new ProblemSetImpl();
s.setValue(173.39);
solver.solve(new ProblemSetHolder(s), 1);
// Print out solution
System.out.println("Problem = " + s.getValue());
System.out.println("Solution = " + s.getSolution());
}
catch (Exception e) {
System.out.println(e) ;
e.printStackTrace(System.out);
}