summaryrefslogtreecommitdiffstats
path: root/vpp-japi/japi/test/demo.java
diff options
context:
space:
mode:
Diffstat (limited to 'vpp-japi/japi/test/demo.java')
-rw-r--r--vpp-japi/japi/test/demo.java17
1 files changed, 5 insertions, 12 deletions
diff --git a/vpp-japi/japi/test/demo.java b/vpp-japi/japi/test/demo.java
index ef419d70658..ea1db84bda2 100644
--- a/vpp-japi/japi/test/demo.java
+++ b/vpp-japi/japi/test/demo.java
@@ -15,9 +15,11 @@
import org.openvpp.vppjapi.*;
-public class demo extends vppApi {
+public class demo {
public static void main (String[] args) throws Exception {
- vppApi api = new vppApi ();
+ vppApi api = new vppApi ("JavaTest");
+ System.out.printf ("Connected OK...");
+
String intlist;
int [] contexts;
int i, limit;
@@ -25,15 +27,6 @@ public class demo extends vppApi {
int rv, errors, saved_error;
long before, after;
- rv = api.clientConnect ("JavaTest");
- if (rv == 0)
- System.out.printf ("Connected OK...");
- else
- {
- System.out.printf ("clientConnect returned %d\n", rv);
- System.exit (1);
- }
-
if (false)
{
intlist = api.getInterfaceList ("");
@@ -171,7 +164,7 @@ public class demo extends vppApi {
limit, after - before,
limit / (after - before));
- api.clientDisconnect();
+ api.close();
System.out.printf ("Done...\n");
}
}