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
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.
Comments
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.