Using Java in scripts

This section contains guides on how to use Java libraries and classes directly within OpenJS scripts.

From importing internal Bukkit or Minecraft server packages to using external Java libraries (external .jar files), these guides walk you through all supported features and best practices.


What you'll learn here:

  • How to import internal server packages and classes

  • How to safely use Java reflection and static fields/methods

  • How to import and use external Java libraries

  • Limitations and workarounds of Java integration in OpenJS

  • Tips for safe cross-version compatibility

Each subpage provides focused help on a specific aspect of Java usage.

This section assumes you already know the basics of writing scripts in OpenJS. If not, check out the Getting Started section first.

Last updated

Was this helpful?