Creating instance and calling instance methods

You are browsing legacy Javonet 1.5 (Java<>.NET bridge for Windows) documentation. Use the left side menu or click here to switch to latest Javonet 2.0 documentation. Javonet 2.0 allows you to use any module from JVM, CLR, Netcore, Python, Ruby, Perl, NodeJS on Windows, Linux and MacOs from any application created in Java, Clojure, Groovy, Kotlin, C#, F#, J#, VB.NET, Python, Perl, Ruby, JavaScript, TypeScript, C++ and GoLang

Javonet lets you create instances of any type from any runtime. Assuming we have a custom any runtime with the following class inside

Select technology of module you want to use:

To create instance and invoke instance method from this class:

I code in:

Select technology of module you want to use:

Javonet calls are very similar to regular .NET or Java calls, with a little bit of reflection style. Value-type results are automatically converted into any runtime types so you can safely assign them to any runtime variables. Reference-type results must be assigned to NObject\JObject variable.

Any calls to .NET or Java objects using Javonet can be shortened and simplified using Javonet Fluent interface.

See Live Example!