What is Greenfoot? Greenfoot teaches object orientation with Java. Create "actors" which live in "worlds" to build games, simulations, and other graphical programs. Greenfoot is visual and interactive. Visualisation and interaction tools are built into the environment. The actors are programmed in standard textual Java code, providing a combination of programming experience in a traditional text-based language with visual execution. The interface is a full IDE which includes project management, auto-completion, syntax highlighting, and other tools common to most IDEs. It also allows you to publish your work both on and offline. However the interface is designed to be simple and easy to use; built with beginners in mind. Greenfoot is used by thousands of institutions around the world. It provides easy transition into other environments, such as BlueJ and more professional IDEs. Greenfoot programs are written in standard Java, one of the primary languages in academia and industry. Concepts learned transfer directly to programming in subsequent environments. Greenfoot makes the environment easy enough to use for beginners, and Java makes it powerful enough to write impressive, flexible and sophisticated applications. System requirements
Installing Greenfoot Download Greenfoot-generic-242.jar (9.647Kb). Make a new directory/folder with the name "greenfoot" or something you like. Copy the file to the new created directory/folder. The copied file is an installer file, so you need first to install it. The commandfile which does the job is included in the zipfile at the end of this page. The contents of greenfoot-installer.cmd are; @echo off set BEGINLIBPATH=[drive: java]\JAVA160\bin set path=[drive: java]\JAVA160\bin set CLASSPATH= [drive: greenfoot] cd [drive: greenfoot]\greenfoot java -Duser.home=[drive: greenfoot]\greenfoot -jar Greenfoot-generic-242.jar 2>greenfoot-bugs.txtI use 2 separate directories/folders, one for Java and one for Greenfoot with the files created by this program. The references used in the cmd file;
should be replaced with real drive letters. Save your version of the file "greenfoot-installer.cmd". This file is copied to the "greenfoot" directory/folder. Furthermore, different paths?, adjust according to your needs. If you start the installation, you have to answer some questions about in which drive is Java and where to install the program. Greenfoot-generic-242.jar is the last version we can use. Next version needs Java 8, probably caused by the use of BlueJ which needs for the last versions also Java 8 minimum. The cmd file The program works with OpenJDK in OS/2-eCS. I have a greenfoot.cmd file with the following contents; @echo off set BEGINLIBPATH=[drive: java]\JAVA160\bin set path=[drive: java]\JAVA160\bin set CLASSPATH= set APPBASE=[drive: greenfoot]\greenfoot set JAVAPATH=[drive: java]\JAVA160 [drive: greenfoot] cd [drive: greenfoot]\greenfoot java -Duser.home=[drive: greenfoot]\greenfoot -Xms64m -Xmx256mThe line beginning with "java ...." is broken into three lines for the sole purpose of this page. The lines "java..." and "-cp ..." and "bluej.Boot..." are one line. Mind the spaces between the commands. I use 2 separate directories/folders, one for Java and one for Greenfoot with the files created by this program. The references used in the cmd file;
should be replaced with real drive letters. Edit and save the file with a name of your choice or use the file from the distribution. This file is copied to the "greenfoot" folder (directory). Furthermore, different paths?, adjust according to your needs. Parameters / options explained
Running the program Be sure to read the "[drive: greenfoot]\greenfoot\tutorial\tutorial.html" file. You learn how to use the tutorial files. As usual help doesn 't work. Every command which need a browser will end in "error=2" error, in other words can't start the browser. Greenfoot will almost close completely if you swith from one scenario to an other. But at the background its started all over and it will popup with a new screen. Despite the specification of memory, it sometimes happens that the startup ends in a crash with a hs_err_pidxxx.log file. I think this has to do with an error in our Java version. Download In the file you can find the above command files (all driveletters are set to Q:!) and a Greenfoot icon: greenfoot-ecs.zip. revision August 27, 2018 |