HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
bytedeco
javacpp
Java2016–2021
bytedeco / javacpp

javacpp

The missing bridge between Java and native C++

6Distinct people
19Mentions
0Explicit recommenders
4.7KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

The missing bridge between Java and native C++

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year19 dated mentions

Observed mentions: 2016-02-13 15:43:24 UTC to 2021-03-25 14:58:56 UTC.

02468102016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 9 mentions; 1 submissions, 8 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC918
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC404
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC303
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101

What Hacker News says

19 sources
Reminds me of https://github.com/bytedeco/javacpp it maps naturally and efficiently many common features afforded by the C++ language and often considered problematic, including overloaded operators, class and function templates, callbacks through function pointers, function objects (aka functors), virtual functions and member function pointers, nested struct definitions, variable length arguments, nested namespaces, large data structures containing arbitrary cycles, virtual and multiple inheritance, passing/returning by value/reference/string/vector, anonymous unions, bit fields, exceptions, destructors and shared or unique pointers (via either try-with-resources or garbage collection), and documentation comments
In CXX - Safe interop between Rust and C++
Disclaimer: I'm affiliated with a semi competing project to panama called javacpp: https://github.com/bytedeco/javacpp I can say for a fact that panama is not seriously targeting this space. We implement a ton of that native code today that works with c++ and actual android today. We also handle gpus. Project panama is only targeting c, and even then will only do it a cross platform non committal fashion. They aren't doing it the way they should be in order to properly target native vectorized code. We know this from experience, because this is all we do: https://github.com/deeplearning4j/deeplearning4j https://github.com/bytedeco/javacpp-presets We tried seeing if we could get some of this work in to the JDK, but their goals fundamentally compete with what it takes to get vector math to be fast. It's also not nearly as ambitious as it n
Read the rest
eeds to be to handle real world tensor workloads.
In Interfacing with native methods on Graal VM
David did a great job with ScalaNLP. It happens to depend on Breeze. I would point out that Breeze does not support n-dimensional arrays (most tensors), although that is necessary to do in deep learning. We wrote ND4S and ScalNet to solve that: https://github.com/deeplearning4j/nd4s https://github.com/deeplearning4j/scalnet Moving computation out of Spark's MLlib and into lower level code like C++, as we do with JavaCPP and libnd4j, also improves speed. https://github.com/deeplearning4j/libnd4j https://github.com/bytedeco/javacpp
In ScalaNLP – A suite of machine learning and numerical computing libraries
If folks are interested in this, I figured some folks might like our c++ version of this (been around for 5 years ish now): https://github.com/bytedeco/javacpp Also comes with tons of pre cooked projects already ready to go: https://github.com/bytedeco/javacpp-presets We use it in production at skymind and it powers our whole cpu and gpu stack with built in memory management among other things. Also has maven and sbt plugins so you can plug it right in to your workflow automatically just maintaining the java code. One of the coolest features is the name matching so you can get semi automatic mapping. We auto generate our JNI bindings from this.
In How the JVM compares strings on x86 using pcmpestri
I'm not exactly sure I'd call those "bindings". If you want an actual compelling competitor to us because we're not a big name, at least look at mxnet. That's more credible. It's incredible that folks insist on this still. Both those frameworks aren't even going to be aiming for any level of integration with the JVM. At least take a look at what makes us different. A big one being: https://github.com/bytedeco/javacpp We own the whole stack here and integrate pretty deeply. This has lead to some great performance improvements. We aren't just "java bindings" but offering a lot more in one place than the other frameworks. Also: I highly doubt you've even looked at the numbers. We're actually doing pretty well in the rankings: https://twitter.com/fchollet/status/915366704401719296 We're not #1 but we have an actual user base. I think a lot o
Read the rest
f our upcoming things like our python bindings where people don't have to "see" java and integrations with spark will win over some folks at big companies..maybe not DL researchers which is also fine. Our upcoming api will be like pytorch though. Regardless: I'm not sure the framework will matter long term given that model import and things like ONNX are becoming more common. Finally, I'll just say this: It doesn't hurt the ecosystem to have more competition and different interests than research. Every single person who says this usually dismisses us for 1 silly reason or another ranging from: 1. Not a "big name" (despite being put in production by a ton of them) 2. Not a lot of research papers (yeah no crap we're not a research framework, we do have publications though!) 3. They see java bindings and can't tell the difference between a full application suite and a tensor lib with java bindings generated by SWIG 4. Usually a PHD student at a university who hasn't worked at a large company and doesn't understand my actual target audience
In Show HN: Eclipse Deeplearning4j
Disclaimer: I run a competing library to the uncomplicate series of libraries. If you want that set of guarantees with just as ease of use,you can look in to ours: http://nd4j.org/ We have various usage examples here: https://github.com/deeplearning4j/dl4j-examples/tree/master/... and the userguide: http://nd4j.org/userguide We have a lot going on underneath the hood, but we pre compile everything out of the box. We maintain a whole software stack for JNI called javacpp: https://github.com/bytedeco/javacpp One of those includes something called a "preset" which bundles openblas as a maven dependency (with the ability to link to mkl if you want) We support cuda as well. If you have any questions, stop by our live chat: https://gitter.im/deeplearning4j/deeplearning4j
In ClojureCUDA – CUDA programming in Clojure
We wrote a lot of that stack ourselves. And our compute code is in c++. There is a lot of stuff going on in big data land (including us) wrapping a lot of the c++ in java and enabling people to use the JVM for what it's good at (data access). We are pushing this with nvidia: https://blogs.nvidia.com/blog/2016/10/06/how-skymind-nvidia-... I also work pretty closely with a lot of the spark/gpu folks at IBM. While I do largely agree with you, we have our own JNI compiler called javacpp that alleviates a lot of those concerns already: https://github.com/bytedeco/javacpp Having our own pointer class and doing our own memory management has helped a lot. What you're talking about is using java for the compute. There's no reason you can't wrap that in a runtime that most people know how to use. A lot of python folks do that now..but then you have
Read the rest
to deal with python's limitations at which point the majority of your code (way more than needs be) will end up being in c anyways vs java where you can write a significant part of your app in java and have it be fast out of the box.
In Challenging Clojure in Common Lisp (2014)
It can though. We are a java shop that does HPC and deep learning. Our work is open source. We've been around 2.5 going on 3 years now. Over the years we've surpassed bottleneck after bottleneck in the JVM. It's a faster wrapper around c code for us. We maintain and created: https://github.com/bytedeco/javacpp which wraps a lot of c++ components. This is also how we do GPUs and the like with our own memory management for our "numpy for java": https://github.com/deeplearning4j/nd4j/tree/master/nd4j-back... Short of it "off heap and NO GC" matters a lot. We have 1 c codebase we use that's meant to be controlled via JNI here: https://github.com/deeplearning4j/libnd4j The speed gains we've seen are massive. Java can't compete with good ole simd and the like for numerical computing. We are a big advocate of the JVM as a platform but let's be c
Read the rest
lear about its weaknesses. You need to use unsafe (see: netty,aeron, and any other low level database written in java or using java as the core language with some c++)and other tricks out of the box for real performance.
In Challenging Clojure in Common Lisp (2014)
Nah I mean this stuff IS hard. That's why I offered that mailing list. Like I said a lot of people from azul and a lot of the hardcore jvm heads sit on there. If there's a way to make java faster for that great. You are are right that the jvm DOES support some of the tight loop stuff. It's harder to do and leads to messy code though. In C++ you can write maintainable code and add pragmas. It's a lot cleaner and with javacpp (https://github.com/bytedeco/javacpp) we just generate the jni bindings. We found that to be easier in practice. I'm admittedly not THAT familiar with the jvm internals. I have just tried to get it to work and have did enough reading to know jni will just be cleaner for that stuff. The JVM is certainly fast enough, just mainly for distributed systems code (eg: databases, message queues) Honestly that's what makes it ap
Read the rest
pealing for me. I can write fast production systems and tweak it where necessary for the HPC apps. Java provides a fast and safe baseline for 90% of the stuff I'd want it to do. We tried for about a year to get it to work for lin alg and finally said screw it let's just do c++.
In 135M messages a second between processes in Java (2013)
We do scientific computing on the jvm (mainly deep learning). We wrote: https://nd4j.org which immitates numpy and co on the jvm with builtin gpu support and linking against blas like other frameworks. We also hand implemented a lot of ufuncs for you in c++. It's mainly oriented towards dense atm though. Sparse will come at some point but it hasn't been a big feature for us. It uses: https://github.com/bytedeco/javacpp underneath. Happy to answer questions!
In 135M messages a second between processes in Java (2013)

Showing the 15 most recent of 19 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.