Question

I am a Mac user who wants to run a few .exe files from my Java process using Process and Runtime classes.

I know that it is not possible to execute .exe files in general in Mac OS X.

Is there a Mac application which can wrap these .exe files so that they can be executed ? Does Apple provide anything by itself ?

The alternative I am using now is to run the Java process in Windows. Yet, it is cumbersome in general.

Was it helpful?

Solution

Darwine

Edit: I should probably point out that this is not a 100% solution. Virtualized Windows will nearly always work better, through Parallels or some similar virtualization software. But Darwine is free and runs most Windows software acceptably.

OTHER TIPS

Besides wine you can get VirtualBox(free), Parallels($$$) or VMWare($$$).

Well, if it's a .NET application then you can possibly run it with Mono, but I'm betting it's a native binary and you'll have to use something like the aforementioned Wine. I thought it was really cool the first time I ran a .exe using Mono on OSX, it just felt wrong, so I had to share.

I don't know if it exists, but you would need something like wine for OSX. The reason why is that the .exe would nearly certainly use OS specific system calls and library functions.

EDIT: looks like it does exist

java -jar file.exe and monofile.exe both works natively on MACOS with native MACOS java and mono

1)Install Wine and Winebottler from http://winebottler.kronenberg.org/

2)You may have to change the System Preferences >Security & Privacy>Allow Apps downloaded from>Anywhere

2)Click the xyz.exe and select winebottler for running application

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top