Simple .NET Console Application Calling Java Method “Hello World”
This sample shows how to use Javonet for .NET developers in C# console application. With Javonet for .NET developers you can reference any Java JAR package in .NET console, desktop, web or service application. You can call any Java method from .NET, set / get fields, retrieve results and do much more. Read .Net Developers Guide for more information.
Sample DetailsSample is created as Visual Studio 2015 project. First we activate Javonet, add reference to sample JAR file and call instance methods, set and get fields and invoke method with arguments. In the activate method you need to provide valid path to Java Runtime Environment (JRE) installed on your machine, that will be used to run Java code. You will need to set also you your Javonet trial, academic or commercial license key which you can obtain here get your license key. |
![]() ![]() |
Sample Source Code
Download Sample Project
Checkout or fork the sample from our GitHub repository:
FirstDotNetConsoleApp on Github
Download all .NET samples as ZIP:
Javonet Samples for .NET Developers ZIP