# Using Julia from the JVM (Clojure)

**URL:** <https://discourse.julialang.org/t/using-julia-from-the-jvm-clojure/51052>\
**Category:** Package Announcements\
**Created:** [December 1, 2020, 4:00pm UTC](https://discourse.julialang.org/t/using-julia-from-the-jvm-clojure/51052 "2020-12-01T16:00:18Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [December 10, 2020, 9:44am UTC](https://discourse.julialang.org/t/using-julia-from-the-jvm-clojure/51052/12 "2020-12-10T09:44:56Z")

</div>

I think what you were trying to do initially was exposing some C function as a built-in function in Julia as one might do in Python. However, in Julia, we just call the C function since LLVM does the work for us.

The conclusion of the following thread is just use [`ccall`](https://docs.julialang.org/en/v1/base/c/#ccall) .

> [@How to define a Julia function from C?](https://discourse.julialang.org/t/how-to-define-a-julia-function-from-c/2566/7):
>
> yuyichao and ihnorton got it exactly – maybe it’s because I’m used to Python but, yeah, I was looking for the equivalent of PyMethodDef. interpreter.c is a good place to look, thanks for that – but I’ll see if I can do something with ccall. Thanks! Irwin

`ccall` is how many `Base` functions are implemented. For example,

> <https://github.com/JuliaLang/julia/blob/master/base/array.jl#L349>

---

_[View the full topic](https://discourse.julialang.org/t/using-julia-from-the-jvm-clojure/51052)._
