(String[] args)
| 8 | public class Client { |
| 9 | |
| 10 | public static void main(String[] args) { |
| 11 | org.omg.CORBA.StringSeqHolder args_holder = |
| 12 | new org.omg.CORBA.StringSeqHolder(args); |
| 13 | i2jrt.ORB orb = i2jrt.ORB.init(args_holder); |
| 14 | |
| 15 | if (orb == null) { |
| 16 | System.err.println("ERROR: Failed to init ORB"); |
| 17 | System.exit(-1); |
| 18 | } |
| 19 | |
| 20 | if (args_holder.value.length < 2 || !"-k".equals(args_holder.value[0])) { |
| 21 | System.err.println("usage: Client -k <ior>"); |
| 22 | System.exit(-1); |
| 23 | } |
| 24 | |
| 25 | String ior = args_holder.value[1]; |
| 26 | org.omg.CORBA.Object obj = orb.string_to_object(ior); |
| 27 | Test.Hello hello = Test.HelloHelper.narrow(obj); |
| 28 | if (hello == null) { |
| 29 | System.err.println("ERROR: couldn't get the Hello object reference"); |
| 30 | System.exit(-1); |
| 31 | } |
| 32 | |
| 33 | String the_string = hello.get_string(); |
| 34 | System.out.println ("Hello Client - get_string returned <" + the_string |
| 35 | + ">"); |
| 36 | hello.shutdown(); |
| 37 | orb.destroy(); |
| 38 | } |
| 39 | } |
nothing calls this directly
no test coverage detected