Theres a game jam coming up that I want to participate in. Java has been what I program games in, so its natural that I would want to use it in this game jam. Problem is, it cannot require other software. And I believe that includes Java. So is there some way to include java within some sort of exe file? Or otherwise include it? Assets dont have to be contained, but the overall size does have to be less than 1GB, so I need enough space for the actual game and assets.
CodePudding user response:
This was answered in this post.
Compiling a java program into an executable
You will need a wrapper for your .jar files.
Lanch4j is one viable option to do this.
Link to software: http://launch4j.sourceforge.net/
Here is a tutorial on how to use it: https://www.youtube.com/watch?v=MyMPPuYGN-U&ab_channel=GoXR3PlusStudio
Best of luck with your game jam.
CodePudding user response:
If running on a Linux machine, a way to do this is by using a JVM that supports compiling the Java program to a native executable.
For example, GraalVM offers native-image compilation functionality.