blob: 4c2c63ee749bd5827c102ced25b2c0a15ac31cb4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
//
// $Id$
import java.io.*;
public class java_server {
public static void main(String[] args) {
// Initialize the ORB.
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args,null);
Test test = new TestImpl (orb);
// Export the newly create object.
orb.connect(test);
// Write the IOR to a file
try {
FileWriter output = new FileWriter("test.ior");
output.write(orb.object_to_string(test));
output.close();
}
catch(java.io.IOException e) {
System.out.println("Exception: " + e);
System.exit(1);
}
System.out.println("The IOR is <"
+ orb.object_to_string(test)
+ ">");
try {
Thread.currentThread().join();
}
catch(InterruptedException e) {
System.out.println(e);
}
}
}
|