# An easy way to call Julia function from Java

**URL:** <https://discourse.julialang.org/t/an-easy-way-to-call-julia-function-from-java/18357>\
**Category:** Internals & Design\
**Tags:** embedding\
**Created:** [December 6, 2018, 2:10am UTC](https://discourse.julialang.org/t/an-easy-way-to-call-julia-function-from-java/18357 "2018-12-06T02:10:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![piofel](https://avatars.discourse-cdn.com/v4/letter/p/7cd45c/32.png) [@piofel](https://discourse.julialang.org/u/piofel)\
**Post date:** [December 6, 2018, 2:10am UTC](https://discourse.julialang.org/t/an-easy-way-to-call-julia-function-from-java/18357/1 "2018-12-06T02:10:52Z")

</div>

What is the easiest way to call a Julia function from Java? And if such possibility is not straightforward, will it be implemented in further versions of Julia (or maybe this requires a new library for Java)? I feel that such a popular language as Java deserves some kind of interface to Julia.

---

<div class="post-metadata">

**Author:** ![simonbyrne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simonbyrne/32/19_2.png) [@simonbyrne](https://discourse.julialang.org/u/simonbyrne)\
**Post date:** [December 6, 2018, 4:38am UTC](https://discourse.julialang.org/t/an-easy-way-to-call-julia-function-from-java/18357/2 "2018-12-06T04:38:23Z")

</div>

From [this comment on the old mailing list](https://groups.google.com/forum/#!topic/julia-users/uutK5viQMjw) it looks like the easiest option would be to use JNI to interact with Julia via its C API, combined with [JavaCall.jl](https://github.com/JuliaInterop/JavaCall.jl) on the Julia side to handle the conversions (this is roughly analogous to how pyjulia works, using PyCall.jl on the Julia side).

As I mentioned on [another thread](https://discourse.julialang.org/t/julia-and-python-conda/18339/3):

> Unfortunately, bindings _from_ external languages aren’t the most popular thing for people to voluntarily work on, since “people who like to write Julia code” don’t directly benefit themselves from that work

---

<div class="post-metadata">

**Author:** ![charcharan](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@charcharan](https://discourse.julialang.org/u/charcharan)\
**Post date:** [December 15, 2021, 10:10am UTC](https://discourse.julialang.org/t/an-easy-way-to-call-julia-function-from-java/18357/3 "2021-12-15T10:10:45Z")

</div>

Hi I am trying to run the julia scripts using simple java service. Since it’s been 2 years, any update on how can we achieve this ?
