forked from zeroc-ice/ice-demos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Client.java
34 lines (30 loc) · 1001 Bytes
/
Client.java
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
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
public class Client
{
public static void main(String[] args)
{
int status = 0;
java.util.List<String> extraArgs = new java.util.ArrayList<>();
final String appName = "demo.Database.library.Client";
//
// Try with resources block - communicator is automatically destroyed
// at the end of this try block
//
try(com.zeroc.Ice.Communicator communicator = com.zeroc.Ice.Util.initialize(args, "config.client", extraArgs))
{
communicator.getProperties().setProperty("Ice.Default.Package", "com.zeroc.demos.Database.library");
if(extraArgs.size() > 1)
{
System.err.println("Usage: " + appName + " [file]");
status = 1;
}
else
{
status = RunParser.runParser(appName, args, communicator);
}
}
System.exit(status);
}
}