src/main/java/com/fizzed/jne/JNE.java
synchronized static public File findExecutable(String name, String targetName, Options options) throws IOException {
        if (options == null) {
            options = DEFAULT_OPTIONS;
        }

        String fileName = options.createExecutableName(name, options.getOperatingSystem());

        String targetFileName = null;

        if (targetName != null) {
            targetFileName = options.createExecutableName(targetName, options.getOperatingSystem());
        }

        // always search for specific arch first
        File file = find(fileName, targetFileName, options, options.getOperatingSystem(), options.getHardwareArchitecture());

        // for x64 fallback to x86 if an exe was not found
        if (file == null && options.isX32ExecutableFallback() && options.getHardwareArchitecture() == HardwareArchitecture.X64) {
            file = find(fileName, targetFileName, options, options.getOperatingSystem(), HardwareArchitecture.X32);
        }

        return file;
    }
synchronized static public File findExecutable(String name, String targetName, Options options) throws IOException {
        if (options == null) {
            options = DEFAULT_OPTIONS;
        }

        String fileName = options.createExecutableName(name, options.getOperatingSystem());

        String targetFileName = null;

        if (targetName != null) {
            targetFileName = options.createExecutableName(targetName, options.getOperatingSystem());
        }

        // always search for specific arch first
        File file = find(fileName, targetFileName, options, options.getOperatingSystem(), options.getHardwareArchitecture());

        // for x64 fallback to x86 if an exe was not found
        if (file == null && options.isX32ExecutableFallback() && options.getHardwareArchitecture() == HardwareArchitecture.X64) {
            file = find(fileName, targetFileName, options, options.getOperatingSystem(), HardwareArchitecture.X32);
        }

        return file;
    }
synchronized static public File findExecutable ( String name , String targetName , Options options ) throws IOException { if ( options == null ) { options = DEFAULT_OPTIONS ; } String fileName = options . createExecutableName ( name , options . getOperatingSystem ( ) ) ; String targetFileName = null ; if ( targetName != null ) { targetFileName = options . createExecutableName ( targetName , options . getOperatingSystem ( ) ) ; } // always search for specific arch first File file = find ( fileName , targetFileName , options , options . getOperatingSystem ( ) , options . getHardwareArchitecture ( ) ) ; // for x64 fallback to x86 if an exe was not found if ( file == null && options . isX32ExecutableFallback ( ) && options . getHardwareArchitecture ( ) == HardwareArchitecture . X64 ) { file = find ( fileName , targetFileName , options , options . getOperatingSystem ( ) , HardwareArchitecture . X32 ) ; } return file ; }
Finds (or extracts) a named executable for the runtime operating system
and architecture. The executable should be a regular Java resource at the
path /jne/[os]/[arch]/[exe].

@param name The executable name you would normally type on the
command-line. For example, "cat" or "ping" would search for "ping.exe" on
windows and "ping" on linux/mac.
@param targetName The executable name you would like the resource (if
found) to be named on extract.
@param options The options to use when finding an executable. If null
then the default options will be used.
@return The executable file or null if no executable found.
@throws java.io.IOException
@throws ExtractException Thrown if a runtime exception occurs while
finding or extracting the executable.
Finds ( or extracts ) a named executable for the runtime operating system and architecture . The executable should be a regular Java resource at the path / jne / [ os ] / [ arch ] / [ exe ] .