I\'d like to use native windows api function in my java class.
The function I am interested in is GetShortPathName. http://msdn.microsoft.com/en-us/library/aa364989%
Thanks for hint. Following is my improved function. It uses Unicode version of the GetShortPathName
import com.sun.jna.Native;
import com.sun.jna.platform.win32.Kernel32;
public static String GetShortPathName(String path) {
char[] result = new char[256];
Kernel32.INSTANCE.GetShortPathName(path, result, result.length);
return Native.toString(result);
}