tags:

views:

3287

answers:

4

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.

+1  A: 

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

Evan Teran
+4  A: 

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.

greyfade
+3  A: 

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

gbrandt
true, except it would be very hard for the java process to interact with those.
Evan Teran
all can be set up to run exe file automatically. so a java process should be able to start them up fine.
gbrandt
there is more to interacting than "starting"
Evan Teran
If the program is written in java... why isn't there a mac version?
Jiaaro
+2  A: 

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.