Commit 4388f293 authored by Brian Panneton's avatar Brian Panneton

Fixed Java Loading issue. You no longer need to use static {...

Fixed Java Loading issue. You no longer need to use static { System.loadLibrary() } at the begining of java code
parent c8d2c323
......@@ -151,14 +151,6 @@ swig -v -c++ -python -o XdmfPython.cpp Xdmf.i
%pragma(java) jniclasscode=%{
static {
try {
System.loadLibrary("XdmfCoreJava");
}
catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load for" +
"XdmfCoreJava\n" + e);
System.exit(1);
}
try {
System.loadLibrary("XdmfJava");
}
......
import mil.army.arl.xdmf.*;
public class TestXdmfEquals {
static {
System.loadLibrary("XdmfCoreJava");
System.loadLibrary("XdmfJava");
}
public static void main (String argv[]) {
System.out.println("Hello World");
......
import mil.army.arl.xdmf.*;
public class TestXdmfJava {
static {
System.loadLibrary("XdmfJava");
System.loadLibrary("XdmfCoreJava");
}
public static void main (String argv[]) {
System.out.println("Hello World");
XdmfWriter writer = XdmfWriter.New("outputJavaTest.xmf");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment