// Path: jxnet-core/src/main/java/com/ardikars/jxnet/exception/PlatformNotSupportedException.java
// public class PlatformNotSupportedException extends RuntimeException {
// 
//     private static final long serialVersionUID = -5714154798477963289L;
// 
//     public PlatformNotSupportedException() {
//         this("");
//     }
// 
//     public PlatformNotSupportedException(final String message) {
//         this(message, new RuntimeException(message));
//     }
// 
//     public PlatformNotSupportedException(final Throwable cause) {
//         this(cause.getMessage(), cause);
//     }
// 
//     public PlatformNotSupportedException(final String message, final Throwable cause) {
//         super(message, cause);
//     }
// 
// }


import com.ardikars.common.annotation.Mutable;
import com.ardikars.common.util.Callback;
import com.ardikars.common.util.InternalNativeLibrary;
import com.ardikars.common.util.Loader;
import com.ardikars.common.util.Platforms;
import com.ardikars.jxnet.exception.PlatformNotSupportedException;
import java.io.File;
                if (Platforms.is64Bit()) {
                    nativeLibrary.register(LINUX_X64);
                } else {
                    nativeLibrary.register(LINUX_X86);
                }
                break;
            case WINDOWS:
                File npcapFile = new File(NPCAP_DLL);
                if (npcapFile.exists())  {
                    System.load(NPCAP_DLL);
                } else {
                    File winpcapFile = new File(WPCAP_DLL);
                    if (winpcapFile.exists()) {
                        System.load(WPCAP_DLL);
                    } else {
                        callback.onFailure(new UnsatisfiedLinkError("Npcap or Winpcap is not installed yet."));
                    }
                }
                if (Platforms.is64Bit()) {
                    nativeLibrary.register(WINDOWS_X64);
                } else {
                    nativeLibrary.register(WINDOWS_X86);
                }
                break;
            case DARWIN:
                if (Platforms.is64Bit()) {
                    nativeLibrary.register(DARWIN_X64);
                }
                break;
            default:
// Path: jxnet-core/src/main/java/com/ardikars/jxnet/exception/PlatformNotSupportedException.java
// public class PlatformNotSupportedException extends RuntimeException {
// 
//     private static final long serialVersionUID = -5714154798477963289L;
// 
//     public PlatformNotSupportedException() {
//         this("");
//     }
// 
//     public PlatformNotSupportedException(final String message) {
//         this(message, new RuntimeException(message));
//     }
// 
//     public PlatformNotSupportedException(final Throwable cause) {
//         this(cause.getMessage(), cause);
//     }
// 
//     public PlatformNotSupportedException(final String message, final Throwable cause) {
//         super(message, cause);
//     }
// 
// }


// Path: jxnet-core/src/main/java/com/ardikars/jxnet/util/DefaultLibraryLoader.java
import com.ardikars.common.annotation.Mutable;
import com.ardikars.common.util.Callback;
import com.ardikars.common.util.InternalNativeLibrary;
import com.ardikars.common.util.Loader;
import com.ardikars.common.util.Platforms;
import com.ardikars.jxnet.exception.PlatformNotSupportedException;
import java.io.File;

                if (Platforms.is64Bit()) {
                    nativeLibrary.register(LINUX_X64);
                } else {
                    nativeLibrary.register(LINUX_X86);
                }
                break;
            case WINDOWS:
                File npcapFile = new File(NPCAP_DLL);
                if (npcapFile.exists())  {
                    System.load(NPCAP_DLL);
                } else {
                    File winpcapFile = new File(WPCAP_DLL);
                    if (winpcapFile.exists()) {
                        System.load(WPCAP_DLL);
                    } else {
                        callback.onFailure(new UnsatisfiedLinkError("Npcap or Winpcap is not installed yet."));
                    }
                }
                if (Platforms.is64Bit()) {
                    nativeLibrary.register(WINDOWS_X64);
                } else {
                    nativeLibrary.register(WINDOWS_X86);
                }
                break;
            case DARWIN:
                if (Platforms.is64Bit()) {
                    nativeLibrary.register(DARWIN_X64);
                }
                break;
            default:
                throw new PlatformNotSupportedException("Your platform does't supported by dynamic jxnet.");