ballerina-lang
ballerina-lang copied to clipboard
Missing a guide for invoking Ballerina code from Java
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.
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