Challenge
Use the functionality of a Java .class file in a .NET project. Because .NET is language-neutral, you can use assemblies created from Java .class files in any .NET project written in any .NET language.
The separate item,"
How to Convert Java .class Files to .NET Executables" shows how to convert a working set of Java .class files into a .NET assembly using the Jblmp utility. The separate item, "
How to Share and Reference .NET Assemblies" demonstrates how to share this assembly among one or more .NET executables, as well as how to reference an assembly from another assembly.
Solution
In the .NET project, reference the assembly created from the appropriate Java .class files. For example, suppose you rewrite the file from "
How to Convert Java .class Files to .NET Executables," GuiApplicationLauncher.java, in C# as shown below:
GuiApplicationLauncher.cs
namespace CSharp
public sealed class GuiApplicationLauncher
public static void Main(string[] args)
new integrated.GuiApplication().init()
Compile this code using the C# command-line compiler and reference the DotNetGui.dll assembly created from the Java .class files:
csc /target:exe /out:ThirdDotNetApplication.exe /r:DotNetGui.dll GuiApplicationLauncher.cs
Looking at ThirdDotNetApplication.exe with IL DASM reveals the C# origins of GuiApplicationLauncher.class. For example, notice that
Main now starts with an uppercase M:

A final look at the manifest shows that the Java origin of the DotNetGui assembly is now only visible inside the DotNetGui assembly itself:
Source