MASES.JCOBridge
2.5.21
dotnet add package MASES.JCOBridge --version 2.5.21
NuGet\Install-Package MASES.JCOBridge -Version 2.5.21
<PackageReference Include="MASES.JCOBridge" Version="2.5.21" />
paket add MASES.JCOBridge --version 2.5.21
#r "nuget: MASES.JCOBridge, 2.5.21"
// Install MASES.JCOBridge as a Cake Addin #addin nuget:?package=MASES.JCOBridge&version=2.5.21 // Install MASES.JCOBridge as a Cake Tool #tool nuget:?package=MASES.JCOBridge&version=2.5.21
JCOBridge
Information and examples on www.jcobridge.com.
Templates moved on NuGet JNet Templates
GitHub hosts some public repositories based on JCOBridge:
Other products extending JCOBridge can be found on https://www.jcobridge.com/products/
Field proven
Built on top of the field proven DLR plugin available in the Sinapse platform (https://www.sinapsesystem.com), JCOBridge guarantees the best performance in JVM and CLR worlds integration.
Features
CLR - Available for .NET Framework (Windows only), 6, 8 and 9 on Windows (x86/x64/Arm64), Linux (x64/Arm/Arm64) and MacOS (x86_64/Aarch64) (other platforms/architectures available on demand):
- Retrieve JVM
Class
both directly or like a developer can done using the .class keyword in Java - Instantiate JVM object both directly or using dynamic feature of .NET
- Invoke static methods both directly on a previously retrieved
Class
or using dynamic feature of .NET - Invoke instance methods both directly on a previously instatiated object or using dynamic feature of .NET
- Get/Set static fields both directly on a previously retrieved
Class
or using dynamic feature of .NET - Get/Set instance fields both directly on a previously instatiated object or using dynamic feature of .NET
- Use dynamic access to write code in a seamless way as it is done in Java language
- Use specific interface to manage directly methods and fields
- Support classes to simplify bridging of Java classes from .NET
- .NET side is able to send back data to the JVM upon events
- Exceptions directly managed from the core and translable in .NET exceptions
- Management of User Interface controls, properties and events
- Able to integrate Java UI (AWT/Swing/SWT) into WPF/WinForms (from version 2.2)
JVM - Available for .NET Framework (Windows only), 6, 8 and 9 on Windows (x86/x64/Arm64), Linux (x64/Arm/Arm64) and MacOS (x86_64/Aarch64) (other platforms/architectures available on demand):
- Retrieve CLR
Type
- Instantiate CLR object
- Invoke static methods on a previously retrieved
Type
- Invoke instance methods on a previously instatiated object
- Get/Set static properties on a previously retrieved
Type
- Get/Set instance properties on a previously instatiated object
- Set Delegates
- Subscribe/Unsubscribe events
- Integrates WPF controls into AWT/Swing window
- Integrate WinForms controls into AWT/Swing window
- Integrate complex .NET Graphical user interfaces objects into AWT/Swing window
- Management of User Interface controls, properties and events
JCOBridge simple example
Imagine you have the following Java Class:
public class MyJavaClass
{
//Static member
static public String myStaticJavaHelloWorld()
{
return "Hello Static World from Java!!";
}
//Instance member
public String myJavaHelloWorld()
{
return "Hello World from Java!!";
}
//Instance member
public double myJavaAdd(double a, double b)
{
return a+b;
}
}
JCOBridge helps to use the previous Java class from C# to access both static and instance methods.
How to call Java code
Define a class that use the Java code:
class MyJavaUsingClass : SetupJVMWrapper
{
public void Execute()
{
string hello = DynJVM.MyJavaClass.myStaticJavaHelloWorld();
Console.WriteLine(hello); //Print "Hello Static World from Java!!"
var myJavaClass = DynJVM.MyJavaClass.@new();
hello = myJavaClass.myJavaHelloWorld();
Console.WriteLine(hello); //Print "Hello World from Java!!"
double result = myJavaClass.myJavaAdd(2.0, 3.0);
Console.WriteLine("{1:0.0}",result); //Print "5.0"
}
}
Add JCOBridge initialization before call the Execute method.
using MASES.LicenseManager.Common;
using MASES.JCBridge.C2JBridge;
using System;
static void Main(string[] args)
{
MyJavaUsingClass JavaTest = new MyJavaUsingClass();
JavaTest.Execute();
}
Other examples are available on JCOBridge website
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. |
.NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
This package has no dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on MASES.JCOBridge:
Package | Downloads |
---|---|
MASES.JNet
Java/JVM suite for .NET - a comprehensive suite of libraries and tools to use Java/JVM APIs (Java, Scala, Kotlin, ...) and .NET side-by-side |
|
MASES.JCOReflectorEngine
JCOReflector Engine - JCOBridge based Java class generator that mimic .NET classes |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
2.5.21 | 444 | 12/19/2024 | |
2.5.20 | 166 | 12/18/2024 | |
2.5.19 | 662 | 11/30/2024 | |
2.5.18 | 130 | 11/28/2024 | |
2.5.17 | 378,321 | 6/22/2024 | |
2.5.16 | 154 | 6/22/2024 | |
2.5.15 | 333 | 6/21/2024 | |
2.5.14 | 419 | 6/17/2024 | |
2.5.13 | 57,139 | 5/14/2024 | |
2.5.12 | 244 | 5/13/2024 | |
2.5.11 | 159,315 | 2/29/2024 | |
2.5.10 | 120,814 | 1/20/2024 | |
2.5.9 | 94,410 | 11/25/2023 | |
2.5.8 | 279,190 | 6/26/2023 | |
2.5.7 | 57,316 | 5/3/2023 | |
2.5.6 | 46,550 | 4/15/2023 | |
2.5.5 | 33,207 | 4/6/2023 | |
2.5.4 | 879 | 4/5/2023 | |
2.5.3 | 65,645 | 2/22/2023 | |
2.5.2 | 56,175 | 2/8/2023 | |
2.5.1 | 1,139 | 1/31/2023 | |
2.5.0 | 1,051 | 1/28/2023 | |
2.4.14 | 424,363 | 8/18/2022 | |
2.4.13 | 1,041 | 8/16/2022 | |
2.4.12 | 37,717 | 5/7/2022 | |
2.4.11 | 1,876 | 4/28/2022 | |
2.4.10 | 1,704 | 4/13/2022 | |
2.4.9 | 6,840 | 3/28/2022 | |
2.4.8 | 3,084 | 3/19/2022 | |
2.4.7 | 3,931 | 3/9/2022 | |
2.4.6 | 3,073 | 2/5/2022 | |
2.4.5 | 969 | 1/8/2022 | |
2.4.4 | 952 | 1/3/2022 | |
2.4.3 | 1,287 | 12/13/2021 | |
2.4.1 | 1,721 | 11/21/2021 | |
2.4.0 | 1,232 | 11/13/2021 |