Obstunes is a Java API for iTunes (macOS) based on JaplScript.
Obstunes is released via Maven. You can install it via the following dependency:
<dependency>
    <groupId>com.tagtraum</groupId>
    <artifactId>obstunes</artifactId>
</dependency>The Maven artifacts also contain sources and javadocs.
If you are using modules,
its name is tagtraum.obstunes.
To use the generated code, do something like this:
import com.tagtraum.macos.itunes.Application;
public class PlayPause {
    public static void main(final String[] args) {
        Application app = Application.getInstance();
        // then use app, for example, to toggle playback (if a track is in the player)
        app.playpause();
    }
}You can find the complete API here.
For information about shipping apps with this library, please see the corresponding notes about signing, notarization etc. in the JaplScript documentation.