Skip to content

Compiling Project

piitex edited this page Mar 31, 2024 · 2 revisions

Compiling

Compiling is the process in which you create an executable for your application. For Java this would be a .jar file. To compile run mvn clean install. You can do this inside of the Maven control panel.

Compilation Errors

If you get errors while compiling ensure you are using the correct Java version. Make sure your project SDK is set the correct Java version. Make sure your Language level is set the correct Java version. Make sure your module is set to the correct Java version. Make sure you are connected to the internet.

Executing Jar File

Before you can execute the jar file you must place the jar file into your game folder Your Game Name-version (Hero Adventure-1.0). You should have done this step when installing assets. Next place the jar file inside of that directory.

image

Next create a new file called start.bat (start.sh for linux). Add the following code to the file.

java -jar Your Jar File Name.jar

Now launch the jar file. If you get an error that says java is not recognize as an internal or external command. Run the file within Intellij. Now your application should start and you should see a window pop up. Please note that the above is not the solution to the problem. You must have Java installed onto your computer.

Distributing Game

This part of the wiki is under construction.

Clone this wiki locally