Bun and Java (JDA)
Bun: pick “Bun 1” in Settings → General. Modules are installed with bun install, your start script or file (index.ts, index.js…) runs with bun: TypeScript works without compiling.
Java 21 (JDA, Javacord…): pick “Java 21”. Upload your project with its pom.xml (Maven) or the Gradle Wrapper (gradlew): it is compiled on install, then the “with dependencies” .jar (shade, assembly or shadowJar plugin) is started. You can also upload your compiled .jar directly.
Main.java
String token = System.getenv("DISCORD_TOKEN");
JDABuilder.createDefault(token).build();💡
Java code is recompiled when your sources change. The JVM memory follows your plan (75% of the RAM for the heap).