Skip to content

A maven starter template for greenfoot outside of its IDE

License

Notifications You must be signed in to change notification settings

LeoTuet/greenfoot-maven-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Greenfoot Maven Starter

This is a simple starter project for using Greenfoot outside of its dedicated IDE. Since more experience developers might want to use a more powerful IDE. This project is tailored to run in VSCode but should be usable in every Environment where Maven is supported.

Installation

To use this project you need to have Maven installed. You can install it via your package manager or download it from the official website.

If you have any problems with the installation, please refer to the official Maven installation guide.

After you have installed Maven do the following:

  1. Clone this repository

    git clone https://github.com/LeoTuet/greenfoot-maven-starter
  2. Open the project in your favorite IDE

  3. Install the dependencies

    mvn clean install

Usage

⚠️ Always close the application via the close button of the Greenfoot window: Otherwise the application will keep running in the background. If you are debugging you wont be able start the application because the debugging port will still be in use. To fix this you will need to kill the process manually. This is how you do it on Windows.

Running the project

To run the project use the following command:

mvn clean javafx:run

To Debug the project (VSCode)

To debug the project use the following command:

mvn clean javafx:run@debug
#Note: The Greenfoot Window will not open until you attach the debugger

As soon as the project is Running go to the Debug tab in the Activity Bar and execute the Attach Debugger. The Greenfoot Window should now open and you can start debugging.

Location of Debugger and Script

Update Greenfoot Version

To update the Greenfoot version you just need to swap out the greenfoot.jar and bluej.jar in the lib folder. After that you should update the pom.xml to the new version.

About

A maven starter template for greenfoot outside of its IDE

Topics

Resources

License

Stars

Watchers

Forks

Languages