Changeset 33777


Ignore:
Timestamp:
2019-12-09T17:48:39+13:00 (4 years ago)
Author:
ak19
Message:

Forgot to document a link, with sample code to use nativecall jar file to get Windows short file names, may be helpful in future, though the work towards it on Friday had led to nowhere and I had to opt for a different solution from online in the end, one that used a DOS process to work out the windows short file name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/util/Utility.java

    r33758 r33777  
    117117   
    118118    /**
    119      * The following calls a method in WindowsNativeFunctions.java to retrieve Windows short file names
    120      * taken from http://dolf.trieschnigg.nl/eightpointthree/eightpointthree.html
    121      * which uses the the non-JNI NativeCall jar file for which WindowsNativeFunctions imports com.eaio.nativecall.*
    122      *
    123119     * returns the short filename (8.3) for a file in Windows
    124120     *
     
    136132    }
    137133   
     134    /*
     135     * The means of getting a Windows Short FileName described at
     136     * http://dolf.trieschnigg.nl/eightpointthree/eightpointthree.html looked ideal
     137     * as it uses the non-JNI NativeCall jar file with imports of com.eaio.nativecall.*
     138     * However, after trying this solution and making all the changes necessary for it,
     139     * I wasn't able to use it after all, because when I finally could run it, the NativeCall.dll
     140     * included in the jar file was of 32 bit and didn't match my 64 bit Windows OS.
     141     * I tried the newer jar NativeCal.jar file and it wasn't compatible with the sample code
     142     * and things wouldn't compile. In the end, I opted for plan B below, as it at least works.
     143     */
    138144    /** 
    139145     * getMSDOSName() and its helper function getAbsolutePath(fileName)
Note: See TracChangeset for help on using the changeset viewer.