I just stumbled upon MainSoft's Grasshopper, which claims to cross-compile .Net ILM to Java bytecode. It seems to use the Mono implementation of the .Net libraries. All of the samples refer to web apps, but my requirement would be to cross-compile a .Net API (class library) to a Java API so that Java clients can use the API. Does anyone have any experience of using Grasshopper, and can you you see any problems with my plan?
+5
A:
I tried it about 12-18 months ago for porting a ASPNET site to something I could run on top of Apache. I know that's not your intended purpose but stay with me.
The process wasn't smooth. There were parts of the .net framework that (at the time) weren't implemented in the grasshopper codebase and once we'd evaluated the extent of the problem, decided that targeting the development version of Mono would be much easier.
Anyway, try it. They had a demo back in the day, so I imagine there's still one about. If you run into a billion language errors, I'd consider a proper port (if the codebase is small). If it works, make sure you have test cases to really test it thoroughly.
Oli
2008-10-01 17:04:56