Its a cli based artifact fetching tool for the JVM ecosystem, and you can have it just make up classpath strings for you, i.e., to use some Apache dependencies with the single file simplified java running you could just:
java --enable-preview --class-path (cs fetch --classpath org.apache.commons:commons-collections4:4.4) program.java
Also, maybe do have a look at scala-cli: https://scala-cli.virtuslab.org/ It does work just fine with Java files, and allows you to write single-file programs that include dependencies as special comments. The tool has some idiosyncrasies (like a background compiler server), but overall works extremely well if you need some of the power of a build tool, but without having a complex project structure.
I always disliked Java until I was converted by some developers of that group in a past job. I suppose it is fair to judge a language by the overall flavour of its ecosystem, but it is a bit disappointing. I wish more people could see how simple and _good_ it can be when you use the JDK itself, and not go through other overcomplicated systems to use it. For example, Spring Boot is basically a massive pile of hacks (regardless of whether you consider it good or bad), and Java only really serves as an underlying support technology for it.
You don't need to fool with Gradle or Maven or Ant if you'd like to incorporate third-party or your own custom dependencies in single-file "Java scripts".
Just copy some .jar files into ~/lib, and in your `.bashrc`: