1 // zxidjavatest.java - Command line for testing calls to libzxid using JNI 2 // Copyright (c) 2013 Synergetics NV (sampo@synergetics.be), All Rights Reserved. 3 // Author: Sampo Kellomaki (sampo@iki.fi) 4 // This is confidential unpublished proprietary source code of the author. 5 // NO WARRANTY, not even implied warranties. Contains trade secrets. 6 // Distribution prohibited unless authorized in writing. 7 // Licensed under Apache License 2.0, see file COPYING. 8 // $Id: zxid.java,v 1.13 2009-11-29 12:23:06 sampo Exp $ 9 // 16.11.2013, created --Sampo 10 // 11 // javac -J-Xmx128m -g zxidjavatest.java 12 // ./zxidjavatest.sh 13 14 import zxidjava.*; 15 16 public class zxidjavatest { 17 static zxidjava.zxid_conf cf; 18 static { System.loadLibrary("zxidjni"); } 19 20 public static void main(String argv[]) throws java.io.IOException 21 { 22 System.err.print("Start...\n"); 23 System.err.print(zxidjni.version_str()); 24 System.err.print("\nTrying to conf...\n"); 25 cf = zxidjni.new_conf_to_cf("CPATH=/var/zxid/"); 26 zxidjni.set_opt(cf, 1, 1); 27 System.err.print(zxidjni.show_conf(cf)); 28 System.err.print("\nDone.\n"); 29 } 30 } 31 32 /* EOF */ 33