This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective. |
The Java Player, sometimes known as the Scratch Player, was the player that ran Scratch 1.4 projects on the Scratch Website. It was made obsolete by the Flash Player, which Scratch 2.0 used.
Problems
- Main article: Why don't my projects work correctly online?
The Java Player on the Scratch Website has always had glitches and bugs. Because Java and Scratch (programmed in Squeak) are completely separate programming languages, it can not process exactly what Scratch wants it to all the time. This means that a lot of projects, especially more advanced ones, are very glitchy online, which means lots of users encourage people to download the project before using it, in the project notes. Some users also made projects dysfunctional online using a method of detecting which player was being used which was based on the way the Java player interpreted blocks that threw errors.
Java also does not have the same mathematical capabilities, so when numbers get too high, or have too many decimal places, Java changes them into scientific notation. There are also rounding errors in that case. For example, the number 1000000000 (1 billion) shows as 1e9.
History
The Java Player has been updated many times since May 2007 (when Scratch was released), although only minor changes like a change in Variable's and List's font, and a system where the player loads sounds before they are played, making the project more synchronized. The current version of the player is Version 39.
On Saturday, May 9, 2013, the Java Player was discontinued on the Scratch website due to the shift to Flash. It only exists for projects embedded in Java on other websites.
Embedding
- Main article: Embedding Projects (1.4)
It is possible to embed a Scratch project played through the Java Player onto another website, by copying and pasting the code given to you underneath the tags of a project.
Obtaining the Java applet
This article has links to websites or programs outside of Scratch and Wikipedia. Remember to stay safe while using the internet, as we cannot guarantee the safety of other websites. |
The Java player can be downloaded from the ScratchR SVN tree, the final version available being here.
Java applets have fallen out of use, and most modern web browsers no longer allow Java, Flash, or other NPAPI plugins.
To use an applet, some HTML code to embed it is required. This could be similar to the code used by ScratchR here in a project page; the parameter project
is simply the path to the .sb
file. In the absence of a Java-compatible web browser, appletviewer
, included in the Java Runtime Environment, may be invoked with an HTML file.