“How to import Greenfoot Project with in Eclipse ? ” This was my assignment task for the Distributed Programming. Greenfoot is especially design to make simple game using Java libraries.The main purpose of importing Greenfoot into Eclipse to integrate the some features of Eclipse while making games in Greenfoot. The steps are very easy as follows.
1. Fire up Eclipse and create new project or locate your existing Greenfoot directory.
2. After locating my greenfoot project “Rollball” , the directory structure looks like this.
3. Right click the JRE System Library and select Build Path >>Configure Build Path..
4.Choose Add External JARs and find the bluejcore.jar (C:\Program Files (x86)\Greenfoot\lib\bluejcore.jar) and greenfoot.jar (C:\Program Files (x86)\Greenfoot\lib\extensions\greenfoot.jar) and click ok.
5. There will come Referenced Libraries in which the just imported Jar will reside.
6.Create a new file at the root of the project as in picture above with name “standalone.properties”. Now copy and paste the below code.
Rollball is the name of your greenfoot project. myworld is the name of my world created in greenfoot.
7.Its time to fix the image location. Open “project.greenfoot” in text editor option find the name of your image used for actors and change the image location.
For Example : class.Rabbit.image=images/Rabbit_small.png.
8. Right the folder and choose Run as application.
If You are interested Try my simple Game built on Greenfoot.