Question or issue on macOS:
Can I run the batch file on UNIX? (Linux / Mac OS X)
I am looking for the interpreter to run the Windows Batch file on UNIX, like ‘bash’ for bash script, ‘csh’ for csh script, so ‘XXX’ for windows batch file.
I am developing a Java application.
…Any ideas?
(Related to)
how i can execute windows batch file from UNIX-AIX?
How to solve this problem?
Solution no. 1:
cmd.exe is rated NSFW in my area code
On windows look at PowerShell
If you insist, use Wine on linux, Solaris, BSD etc. It comes with cmd.exe 🙂
Wikipedia on Wine
MacOSX support:
- http://wiki.winehq.org/MacOSX
- http://davidbaumgold.com/tutorials/wine-mac/
Solution no. 2:
No, there isn’t such a beast. And, if there is a god, there never will be 🙂
While the effort to create a batch file interpreter is moderate to high (especially if you’re not using every single feature of cmd.exe
), running the executable is so much, much harder.
I would be investigating a solution of starting up a clean Windows virtual machine and running your application under Windows there. You could easily do your unit tests as Windows programs as well so as not to have to worry about driving the VM from OSX.
The only thing you then need to concern yourself with is how to get the results back to OSX from the Windows VM. That should be doable (though kludgy) via network storage (shared drives or NFS or something similar).