JavaCall.jl version 0.8.0 was released last week.
This is a breaking change due to a significantly revised Java references system. This provides better control over memory at the interface, preventing memory leaks.
An important user interface change is the @jcall
macro, similar to @ccall
.
Due to the Julia stack implementation and lack of signal chaning capability initiated from the Julia side, JULIA_COPY_STACKS=1
is still required on macOS and Linux.
$ JULIA_COPY_STACKS=1 julia
Here is a demonstration of the @jcall
macro.
julia> using JavaCall
julia> JavaCall.init()
julia> const System = @jimport java.lang.System
JavaObject{Symbol("java.lang.System")}
julia> @jcall System.out.println("Hello world"::JString)::Nothing
Hello world
This release has been 1.5 years in the making. My near term objectives are to improve the documentation.