ballerina-lang icon indicating copy to clipboard operation
ballerina-lang copied to clipboard

Missing a guide for invoking Ballerina code from Java

Open kaviththiranga opened this issue 4 years ago • 1 comments

https://ballerina.io/learn/how-to-call-java-code-from-ballerina/

In Java interop guide, it is mentioned that we can invoke Ballerina code from Java side. But there is no any guide available for it.

kaviththiranga avatar May 23 '20 01:05 kaviththiranga

Yes we do need documentation on this. But since this will have both java and ballerina code, we'll have to do a Learn page instead a BBG. Also just to clarify, we currently only provide an API to invoke instance methods, but not static functions. Just in case there is an example .https://github.com/manuranga/ballerina/blob/6a5896b00116af71b1bb236177ab7c2fae61e5be/tests/jballerina-unit-test/src/test/java/org/ballerinalang/nativeimpl/jvm/tests/Timer.java#L38

manuranga avatar Oct 12 '20 07:10 manuranga