How can I run linux binary under windows? Is there some emulation jar or something to run linux program under windo开发者_StackOverflow中文版ws from java program code like Runtime.getRuntime().exec()?
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.
In some cases tool like cygwin can help you. BTW if you wish to run windows program under linux you can use wine.
This is completely impossible for arbitrary (non-Java) programs.
You can use a virtual machine with linux installed inside of windows.
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.
精彩评论