001/* Copyright (C) Cross The Road Electronics 2024 */ 002package com.ctre.phoenix; 003 004public class CTREJNIWrapper { 005 static boolean libraryLoaded = false; 006 007 static { 008 if (!libraryLoaded) { 009 //try to load real CCI, then Sim 010 try{ 011 System.loadLibrary("CTRE_PhoenixCCI"); 012 } catch (UnsatisfiedLinkError err) { 013 try { 014 System.loadLibrary("CTRE_PhoenixCCISim"); 015 } catch (UnsatisfiedLinkError e) { 016 err.printStackTrace(); 017 System.exit(1); 018 } 019 } 020 libraryLoaded = true; 021 } 022 } 023}