// Path: src/main/java/RFLogger.java
// public class RFLogger {
// 
//     private String fileName = "./classes/log.properties";
//     private static java.util.logging.Logger logger = null;
//     
//     private static ConsoleHandler consoleHandler;
//     
//     private static SimpleFormatter simpleFormatter;
// 
//     private RFLogger() {
// 
//         // Create the logger.
//         logger = java.util.logging.Logger.getLogger(RFLogger.class.getName());
// 
//         try {
//             java.util.logging.LogManager.getLogManager().readConfiguration(new FileInputStream(fileName));
// 
//         }
//         catch (IOException e) {
//             System.out.println("Unable to configure logging for " + fileName);
// 
//             e.printStackTrace();
// 
//             System.out.println("Resorting to console handler.");
// 
//         
//             //Create consoleHandler.
//             consoleHandler = new ConsoleHandler();
//         
//             //Assigning handler to logger object.
//             logger.addHandler(consoleHandler);
//         
//             //Setting levels to handler and logger.
//             consoleHandler.setLevel(Level.INFO);
//             logger.setLevel(Level.ALL);
//         
//             // Creating SimpleFormatter for human readable format.
//             simpleFormatter = new SimpleFormatter();
// 
//             // Setting formatter to all handlers.
//             consoleHandler.setFormatter(simpleFormatter);
// 
//             // Remove parent handlers in order to respect our formatting only.
//             // logger.setUseParentHandlers(false);
//         }
//     }
//     
//     private static java.util.logging.Logger getLogger() {
//         if(logger == null){
//             new RFLogger();
//         }
//         return logger;
//     }
//     
//     public static void log(Level level, String msg, Throwable thrown){
//         getLogger().log(level, msg, thrown);
//     }
//     
//     public static void log(Level level, String msg){
//         getLogger().log(level, msg);
//     }
// 
// }


import com.kogalur.randomforest.RFLogger;
import java.io.File;
import java.util.LinkedHashMap;
import java.util.logging.Level;
import java.io.IOException;
import java.lang.SecurityException;
package com.kogalur.randomforest;




class Native {

    private static Native myInstance;

    static {
        File file = new File(".");

        String libraryLocation;
        String libraryName;
        String opsSwitch;
        String sep;
        boolean libraryFlag;

        try {

            libraryFlag = true;
            libraryLocation = file.getCanonicalPath();
            sep = File.separator;

            opsSwitch = System.getProperty("os.name");
            if (opsSwitch.startsWith("Windows")) {
                libraryName = "@PROJECT_PACKAGE_NAME@.dll";
            }
            else if (opsSwitch.startsWith("Mac OS X")) {
                libraryName = "lib@PROJECT_PACKAGE_NAME@.jnilib";
            }
            else if (opsSwitch.startsWith("Linux")) {
                libraryName = "lib@PROJECT_PACKAGE_NAME@.so";
            }
            else {
                libraryFlag = false;
// Path: src/main/java/RFLogger.java
// public class RFLogger {
// 
//     private String fileName = "./classes/log.properties";
//     private static java.util.logging.Logger logger = null;
//     
//     private static ConsoleHandler consoleHandler;
//     
//     private static SimpleFormatter simpleFormatter;
// 
//     private RFLogger() {
// 
//         // Create the logger.
//         logger = java.util.logging.Logger.getLogger(RFLogger.class.getName());
// 
//         try {
//             java.util.logging.LogManager.getLogManager().readConfiguration(new FileInputStream(fileName));
// 
//         }
//         catch (IOException e) {
//             System.out.println("Unable to configure logging for " + fileName);
// 
//             e.printStackTrace();
// 
//             System.out.println("Resorting to console handler.");
// 
//         
//             //Create consoleHandler.
//             consoleHandler = new ConsoleHandler();
//         
//             //Assigning handler to logger object.
//             logger.addHandler(consoleHandler);
//         
//             //Setting levels to handler and logger.
//             consoleHandler.setLevel(Level.INFO);
//             logger.setLevel(Level.ALL);
//         
//             // Creating SimpleFormatter for human readable format.
//             simpleFormatter = new SimpleFormatter();
// 
//             // Setting formatter to all handlers.
//             consoleHandler.setFormatter(simpleFormatter);
// 
//             // Remove parent handlers in order to respect our formatting only.
//             // logger.setUseParentHandlers(false);
//         }
//     }
//     
//     private static java.util.logging.Logger getLogger() {
//         if(logger == null){
//             new RFLogger();
//         }
//         return logger;
//     }
//     
//     public static void log(Level level, String msg, Throwable thrown){
//         getLogger().log(level, msg, thrown);
//     }
//     
//     public static void log(Level level, String msg){
//         getLogger().log(level, msg);
//     }
// 
// }


// Path: src/main/java/Native.java
import com.kogalur.randomforest.RFLogger;
import java.io.File;
import java.util.LinkedHashMap;
import java.util.logging.Level;
import java.io.IOException;
import java.lang.SecurityException;

package com.kogalur.randomforest;




class Native {

    private static Native myInstance;

    static {
        File file = new File(".");

        String libraryLocation;
        String libraryName;
        String opsSwitch;
        String sep;
        boolean libraryFlag;

        try {

            libraryFlag = true;
            libraryLocation = file.getCanonicalPath();
            sep = File.separator;

            opsSwitch = System.getProperty("os.name");
            if (opsSwitch.startsWith("Windows")) {
                libraryName = "@PROJECT_PACKAGE_NAME@.dll";
            }
            else if (opsSwitch.startsWith("Mac OS X")) {
                libraryName = "lib@PROJECT_PACKAGE_NAME@.jnilib";
            }
            else if (opsSwitch.startsWith("Linux")) {
                libraryName = "lib@PROJECT_PACKAGE_NAME@.so";
            }
            else {
                libraryFlag = false;
                RFLogger.log(Level.SEVERE, "Unknown OS in determining shared object library for @PROJECT_PACKAGE_NAME@: " + opsSwitch);