Interfacing with native or interpreted languages (e.g. .Net / Mono / Java)



Fairly new and exploring whether electron could be our go-to UI corss platform for our future desktop applications, which need to run on OSX, Windows (7 to 10), and future linux distributions. We write have our logic currently in .Net/Mono (which holds platform specific code for deep system manipulation) - but want to explore a better UI platform.

Would a scenario work where one starts up the electron shell, which then starts or calls into the code of .Net/Mono or Java application. Either via starting up the process and the communicating, or, by another means?

In an ideal world, we’d like to use electron fully, but unfortunately I think we need platform specific logic (which now we handle in C# w/ .net & mono). This includes for example the scanning & listing of process info, taking screenshots, etc… Sending network information (which websites were visited etc…) It’s in essence an exam monitor for students when they’re doing an online exam in classrooms.




you have various options here…

  • You might just package your Electron front-end with the other application(s) and start them in the background. Communication can be done via sockets locally

  • You can (easily) integrate C/C++ code via node-gyp (most used way)

  • You can integrate Java code via node-java (not preferable)

  • You can integrate .Net/Mono code via (up to you)

As Mono offers an Ahead-of-Time compilation option (with some limitations of dynamic language features at run-time) you might also compile your C# code to a native executable/library and embed this one in your Electron application (

#3 does it very well but I have no idea how it works - There’s a Kestrel/OWIN app running and it launches Electron somehow.