Wiki section on the subject: https://pzwiki.net/wiki/Java
As of B42.13 Project Zomboid uses Java Version 25 to run. To compile and run custom code for Project Zomboid: You must be using Java Version 25. Java Version 25 can be found here: (https://www.oracle.com/java/technologies/javase/jdk25-archive-downloads.html)
To compile a .java file into a .class file: You can type this command into a suitable terminal (PowerShell or preferably Command Prompt [CMD] )
```
javac -cp "GameFiles\projectzomboid.jar" "path/file.java"
While making sure to replace "GameFiles" with the path to your Project Zomboid Game Files and "path/file.java" with the path to the file you want to compile
Run the command and your new .class file should be there
If there is no errors in the terminal window but your class file doesn't appear, try refreshing your explorer window
You can then drag the class file into your Game/Server files (GameFiles/zombie/iso for example) and the class files should run
If you are stuck: Don't be afraid to ask for help