Have you think any trick that compile Java in .Net Framework or vice versa. No or Yes Whatever your answer is but now I am going show you the trick in which our JAVA code will run under .net Framework. Before that let me introduce the some Technical Terms.
Mono:
Mono is a free and open source project led by Xamarin (formerly by Novell and originally by Ximian) to create an Ecma standard compliant .NET Framework-compatible set of tools including, among others, a C# compiler and a Common Language Runtime.