Skip to content

Instantly share code, notes, and snippets.

@rchavarria
Created January 12, 2012 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rchavarria/1601499 to your computer and use it in GitHub Desktop.
Save rchavarria/1601499 to your computer and use it in GitHub Desktop.
import com.tibco.tibrv.Tibrv;
import com.tibco.tibrv.TibrvException;
public class TibrvLoaderTest {
public static void main(String[] args) {
new TibrvLoaderTest().start();
}
private void start() {
printClasspath();
printLibraryPath();
testLoadLibrary();
openTibrvjLibrary();
}
private void printClasspath() {
String cp = System.getProperty("java.class.path");
for(String cpElement : cp.split(";")){
System.out.println("Classpath element: " + cpElement);
}
}
private void printLibraryPath() {
String lp = System.getProperty("java.library.path");
for(String lpElement : lp.split(";")){
System.out.println("Library path element: " + lpElement);
}
}
private void testLoadLibrary() {
System.loadLibrary("tibrvj");
}
private void openTibrvjLibrary() {
try {
Tibrv.open(Tibrv.IMPL_NATIVE);
} catch (TibrvException e) {
throw new RuntimeException("Can't load Tibrv", e);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment