JNet: Java/JVM suite for .NET
JNet is a comprehensive suite of libraries and tools to use Java/JVM APIs (Java, Scala, Kotlin, ...) and .NET side-by-side.
Libraries and Tools
Scope of the project
This project aims to create a set of libraries and tools to direct access, from .NET, all the features available in the Java Platform, this is the counterpart of JCOReflector.
There are many client libraries written to manage communication with Java. Conversely, this project use directly the Java packages giving more than one benefit:
- all implemented features are availables at no extra implementation costs, see JNet usage;
- avoids any third party communication protocol implementation;
- access all features made available from Java platform.
So, for example, do you want an
ArrayList? Just write in C# a line of code like this:
Java.Util.ArrayList<string> alist = new Java.Util.ArrayList<string>();
See JNet usage for a comprehensive example.
Community and Contribution
Do you like the project?
- Request your free community subscription.
Do you want to help us?
- put a ⭐ on this project
- open issues to request features or report bugs 🐛
- improves the project with Pull Requests
This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to firstname.lastname@example.org.
- Actual state
- JNet usage
- JNet APIs extensibility
- JNet CLI usage
- JNet Reflector usage
- JNet PowerShell usage
- V1.4.8+: From version 1.4.8 there is a new project, named JNetReflector (still in development phase), able to build C# gateway classes from JARs containing the JVM classes, exactly the same JCOReflector does for .NET in JVM.
- V1.4.9+: From version 1.4.9 there are two new projects:
- JNetPSCore: the core library for PowerShell development, it can be extended in other projects based on JNet;
- JNetPS: a PowerShell module to use JNet within a PowerShell shell.
- V1.5.2+: strong improvement of JNetReflector; it is used to generate almost all Java 11 classes available in the corresponding JNet version
- V1.5.3+: JNetReflector manages generics and almost all classes of Java SE 11 are covered: see JNet Reflector usage
- V2.0.0+: the most notable changes in this version are in:
- JNet: complete review of all classes based on automatic generation done using JNetReflector
- JNetReflector: improvements in many areas from generation of .NET interfaces to generics and where clauses, full story in https://github.com/masesgroup/JNet/issues/178
- Direct access the JVM from any .NET application:
- Any Java/Scala/Kotlin/... class can be directly managed;
- No need to learn new APIs: we try to expose the same APIs in C# style;
- No extra validation cycle on protocol and functionality: bug fix, improvements, new features are immediately available;
- Documentation is shared;
- Dynamic code: it helps to write a Java/Scala/Kotlin/etc seamless language code directly inside a standard .NET application written in C#/VB.NET: look at this simple example and JNet APIs extensibility.
Have a look at the following JCOBridge resources: