Files
cpp-thirdparty/winx64/bin/swig-3.0.12/Examples/test-suite/java/java_constants_runme.java
Bassem Girgis 81b4b9e273 Initial commit
2018-12-20 17:34:07 -06:00

30 lines
775 B
Java

import java_constants.*;
public class java_constants_runme {
static {
try {
System.loadLibrary("java_constants");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
System.exit(1);
}
}
public static void main(String argv[])
{
int number = 200;
// Switch statement will only compile if these constants are initialised
// from a constant Java value, that is not from a function call
switch(number) {
case java_constants.CHINA:
break;
case java_constants.BRISTOLS:
break;
default:
break;
}
}
}