One of my recent projects required me to get an access to the low-level MacOS API, which can be done via Java Native Interface (JNI). In this article i’ll describe steps I had to do to setup the project to make a screenshot of a specific application’s window. The corresponding code can be found in this Github repository.