https://github.com/electronstudio/jaylib-maven-example-project
Example Maven project for Jaylib
https://github.com/electronstudio/jaylib-maven-example-project
Last synced: 10 months ago
JSON representation
Example Maven project for Jaylib
- Host: GitHub
- URL: https://github.com/electronstudio/jaylib-maven-example-project
- Owner: electronstudio
- Created: 2021-11-17T21:56:03.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-12-26T15:23:41.000Z (over 1 year ago)
- Last Synced: 2025-03-28T01:14:24.575Z (about 1 year ago)
- Language: Java
- Size: 71.3 KB
- Stars: 7
- Watchers: 1
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example Maven project for Jaylib
You can import this project into IntelliJ or Eclipse.
## Use it to run the included examples in IntelliJ
Right-click on the example and select `run`.
## Use it to run the included examples from the command line
mvn compile exec:java -Dmain.class="examples.HeightMap"
mvn compile exec:java -Dmain.class="examples.CubicMap"
## Use it as the basis of your own game.
Edit `Main.java` with your own code. (You can delete the examples.) Then
To run:
mvn compile exec:java
To build an uberjar you can distribute:
mvn package
To run your uberjar (requires user has Java installed):
java -jar target/jaylib-maven-example-project-1.0-SNAPSHOT.jar
## Native image
You will need to download [Graal](https://www.graalvm.org/downloads/) and extract the archive. Set an env variable
with the location, e.g.
export GRAALVM_HOME=/home/richard/Downloads/graalvm-jdk-22+36.1/
Then to build a native image you can distribute that doesn't require Java to run:
mvn clean -Pnative package
If you have any game resouces (images, sounds) that you store *inside* your jar file then
you will need to edit src/main/resources/META-INF/native-image/reflect-config.json
to let native-image find them.