Run 16 bit program on 64 machine bit without dosbox
Solution 1:
It's definitely not possible on Windows, see the following MSDN article: http://support.microsoft.com/kb/896458
Any tool that will allow you to run a 16bit prog on a 64bit Windows system has to emulate a system, which is what DOSbox does.
The following works:
public class DosBoxCaller {
public static void main(String[] args) {
ProcessBuilder pb = new ProcessBuilder(
"C:\\Program Files\\DOSBox-0.74\\DOSBox.exe",
"-conf C:\\Users\\Y\\dosbox.conf");
pb.directory(new File("C:\\Users\\Y"));
pb.redirectErrorStream(true);
try {
Process p = pb.start();
} catch (Exception e) {
e.printStackTrace();
}
}
}
If this doesn't call DOSBox for you, then you're probably getting a path wrong and simply ignoring the exception that is being thrown. Also doublecheck that your conf option is valid, and use a modified copy of the fullfledged dosbox config (to be found at your user folder\Application Data\Local\DosBox, copy it to your favorite folder, then edit autoexec).
Solution 2:
There's an emulator which can run simple commandline DOS programs in Windows x64. It's called "MS-DOS Player for Win32-x64". The source is provided, so in theory you can implement missing functionality.
http://takeda-toshiya.my.coocan.jp/msdos/index.html