Skip to content

Setting up the project

Stephcraft edited this page Jan 1, 2020 · 2 revisions

Introduction

The game is developed with the Eclipse IDE. The java project is the source folder, and the source code of the project is located in source/src.

Why Eclipse ?
Because it is easier to organize source code files by using packages. The processing IDE does not support that feature yet?

What is processing ?
Processing is a simple java library mainly used to create visual art very easily. Here is the Processing website

Steps

eclipse IntelliJ
Eclipse IntelliJ

Eclipse

todo

IntelliJ

todo

Help

Manage libraries

right click on the project folder > Build Path > Configure Build Path

If you have weird errors try these

Project > Clean...
right click on the project folder > Refresh

Maven setup instructions

Downloads

  • Download the latest version of eclipse here: https://www.eclipse.org/downloads/
  • Download openjdk 8 with openjfx here: https://azul.com/downloads/. Any other jdk 8 package will work so long as it's bundled with javaFX/openJFX. Extract the archive to a location you will remember (eg. C:\Program Files\Zulu\zulufx-8)

If eclipse can't find any JDK on your system it will refuse to launch. If this is the case you need to include the JDK we just downloaded in your PATH environment variable. Typically this means setting a variable called JAVA_HOME and then prepending JAVA_HOME\bin to PATH. On Windows, environment variables can be accessed under System Properties > Advanced > Environment Variables.

Import the project in eclipse

Navigate toFile > Open Projects from File System...

Click on Directory... and select the location of the Project-16x16 folder Then click on Finish to import your project in eclipse

Set the JRE system library

In the project tree, look at the JRE System Library item. If it isn't set to JavaSE-1.8 then right-click it, select properties > Installed JREs... > Search... and navigate to your zulufx-8 folder. You should then see an item matching your zulufx-8 folder; select that and apply and close.

Run the project

The main class of the project is src/main/java/project_16x16/SideScroller.java. The project can be run in eclipse by right clicking the src/main/java package in the source tree and selecting run as > Java Application

Error troubleshooting

  • right-click the main project and select Maven > Update Project... then hit OK. This will refresh the Maven configuration and dependencies.