0

How can I run linux binary under windows? Is there some emulation jar or something to run linux program under windows from java program code like Runtime.getRuntime().exec()?

5 Answers 5

3

Assuming that you're asking if you're able to run a random Linux binary (ie, not a Java program built under Linux) under Windows, the answer is simple - no, not without building it as a Windows executable.

You should be able to run a 100% Java program on Windows and Linux unless you're making use of libraries that aren't available on both OSs.

1

In some cases tool like cygwin can help you. BTW if you wish to run windows program under linux you can use wine.

1

This is completely impossible for arbitrary (non-Java) programs.

0
1

You can use a virtual machine with linux installed inside of windows.

1
  • I expect rather answer about use JPC to emulate, because virtualization is so obvious
    – user334596
    Nov 16, 2010 at 18:54
1

This not possible unless it's binary of an interpreted language (like Java binary). Also looks completely imposable to write a 'converter' between OSes: even slight difference in design of the OSes cannot be converted as it becomes necessary to write 'logic' converter!?? (not even mentioning the numerous Unix implementations) Think of this: if to linux process means different thing from what it means to windows then how would this get converted ?:) It's not only syntactical but most importantly a logic difference which hurdles possibility of having what you need exist already.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.