Preparing for SDN

Java · Updated 09 November 2026

What a Script Market JAR must contain, and how to submit it.

Java scripts can be published through the Script Market today. Read What SDN is first if you are new to it. This page covers what your JAR needs and how to submit it.

The checklist

  1. Both registrations. Your JAR needs module-info.class with a provides com.botwithus.bot.api.BotScript with ... clause and a META-INF/services/com.botwithus.bot.api.BotScript file that lists the same classes. A JAR that works locally with only module-info can still fail in the Script Market. See Project setup.
  2. The API is never bundled. Declare com.botwithus:bot-api as compileOnly. The same goes for ImGui. The host provides both, along with SLF4J. Do not bundle a library the host already provides, such as Gson: the script then fails to load.
  3. Pack your own libraries inside the JAR. Anything else your script uses at runtime, such as a helper library or code from another of your modules, has to be inside your JAR. Nothing else is installed next to it.
  4. Bump the version for every release. Change version in @ScriptManifest each time you upload a new build, so you and your users can tell builds apart.
  5. Do not sign anything. Protecting a published script is done by the server and the BotWithUs software, not by you. Upload the plain JAR your build produces.

Packing libraries

One way to merge your runtime dependencies into the JAR is to unpack them into it in the jar task. Because the API and ImGui are compileOnly, they are not on the runtime classpath and are left out:

tasks.jar {
    from(configurations.runtimeClasspath.map { files -> files.map { zipTree(it) } }) {
        exclude("module-info.class")
        exclude("META-INF/MANIFEST.MF")
    }
    duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

A library merged this way is no longer a module of its own, so in module-info.java you requires static it rather than requires it.

Check the result with the JDK's jar tool. List the files to see that every package you bundled is inside:

jar tf build/libs/my-script.jar

Then describe the module and check that provides names your script classes:

jar --describe-module --file build/libs/my-script.jar

The contains line there lists only your own packages, even when the bundled ones are inside, so use jar tf for those.

Submitting

  1. Open Script Market → New Marketplace Submission (/sdn/submit/). You need an active BotWithUs subscription.
  2. Fill in the form:
  3. Name: unique across the Script Market.

  4. Tagline: up to 54 characters, shown in listings.

  5. Description and Usage Guide: both Markdown. Explain what the script does, what it needs, and how to set it up.

  6. Category and Script Language: choose Java (Kotlin scripts count as Java).

  7. Agent support: tick at least one. Scripts written against the API in this wiki are for Agent v2.

  8. Repository and Repository Token (optional): a link to your source, and a token if that repository is private.

  9. Private Script: only you and the users you add by hand can use it.

  10. Pricing: a price for each duration you want to offer, from free to yearly.

  11. Submit. The BotWithUs team reviews new scripts before they are listed.
  12. Upload builds from your script's Versions page: choose the agent version, pick the JAR, and add notes for your users. Each new build goes through the same page.