001/* 002 * Copyright (C) Cross The Road Electronics. All rights reserved. 003 * License information can be found in CTRE_LICENSE.txt 004 * For support and suggestions contact support@ctr-electronics.com or file 005 * an issue tracker at https://github.com/CrossTheRoadElec/Phoenix-Releases 006 */ 007package com.ctre.phoenixpro.jni; 008 009public class CtreJniWrapper { 010 static boolean libraryLoaded = false; 011 012 static { 013 if (!libraryLoaded) { 014 // try to load real CCI, then Sim 015 try { 016 System.loadLibrary("CTRE_PhoenixTools"); 017 } catch (UnsatisfiedLinkError err) { 018 try { 019 System.loadLibrary("CTRE_PhoenixTools_Sim"); 020 } catch (UnsatisfiedLinkError e) { 021 err.printStackTrace(); 022 System.exit(1); 023 } 024 } 025 libraryLoaded = true; 026 } 027 } 028}