]> The Shtick: Scratch Runner

The Shtick The Shtick: Scratch Runner Scratch Runner

About

Scratch Runner is an emulator for Scratch programs. A Java application is available for download as well as a couple of libraries for Java developers who might be interested in embedding Scratch projects into their Java applications.

2 July 2018

System Requirements

Generic Download

This is a generic download for executing Scratch programs on any desktop environment that meets the System Requirements.

Download
  1. Download the application from the link above.
  2. Unzip the the downloaded file into a folder.
  3. Move the extracted folder into an appropriate installation folder. (Suggestions: Desktop, memory stick, C:\Program Files\, ~\utils\, etc.)
  4. To run a scratch project from the command line, the syntax is as follows:
    java -jar scratchrunner.jar -f <Project File>

Windows Download

This is similar to the generic download, except that a couple of registry files are included to facilitate adding a "Run" command to the context (right click) menu for Scratch 2 project files.

Download
  1. Download the application from the link above.
  2. Unzip the the downloaded file into a folder.
  3. Move the extracted folder into an appropriate installation folder. (Suggestions: Desktop, memory stick, C:\Program Files\, ~\utils\, etc.)
  4. To run a scratch project from the command line, the syntax is as follows:
    java -jar scratchrunner.jar -f <Project File>
  5. To run a scratch project from the context menu, the two included registry files will need to be merged into your registry.
  6. Right-click on sb2.reg and select "Merge" to merge the registry entries that define the file type.
  7. Edit sb2run.reg, replacing the path to scratchrunner.jar, with the path where you installed scratchrunner.jar.
  8. Right-click on sb2run.reg and select "Merge" to merge the registry entries that define the file type.
  9. Now you should be able to run a Scratch 2 project file by right-clicking on the file and selecting the "Run" option from the context menu.

Library Downloads

The library downloads allow you to include Scratch 2 projects in your own Java applications. The library generates and provides a subclass of JPanel to represent the stage, which can then be embedded in any swing layout.

As an example of the usage of the OSGI library (using Apache Felix), see the scratch-runner-main project in Github. The plain library works similarly, except no automated mechanism exists to register feature sets, so this has to be done manually.

The application download can be used to see how well emulation of a given project would work.

Plain Download
OSGI Download

Recent Updates

Known Emulation Issues