Getting Started with Redline Smalltalk

Quickiest Start - From executables

Follow these instructions to be executing Smalltalk code with Redline Smalltalk as quickly as possible. Note: '>' represents the prompt on your command line / shell.

            >unzip -d redline
            >cd redline
            >java -jar redline-0.6-SNAPSHOT.jar st.redline.script.HelloWorld

You should see the following message from Redline Smalltalk (CURRENTLY with a lot of debug output):

            Hello World from Redline Smalltalk.

To execute your own Smalltalk code create a file with a '.st' extension using your favourite editor and then execute it with the above 'java -jar' command. Note: Don't add the '.st' when executing with 'stic'. Open the file to see an example of Smalltalk code.

If you have decided to adopt a class and help Redline then you need to create a '.st' file in the corresponding folder, and you need to put the associated test under the 'test' folder. For example, if you have adopted the Date class then you would create the '' file that defines the Date class in the 'src/main/smalltalk/st/redline/kernel' folder, and a '' file in the 'src/test/st/redline/kernel' folder.

Don't forget that you may need to edit the 'test/st/redline/kernel/' file to ensure your test is run as part of the suite.

When you are happy with your adopted class and its tests you can email them to along with the DEVELOPER-CERTIFICATE-OF-ORIGIN to have them added to the project sources.

Quick Start - From sources

Follow these instructions to get Redline Smalltalk started with a clean build from source code, and a running Smalltalk Hello World example. First you will need to get some of the dependencies for Redline sorted out, these include:

  • JDK - To compile Redline Smalltalks Java source code.
  • Apache Maven - To handle the building, dependencies, testing and packaging for the Redline Smalltalk Java source code.
  • Git - To fetch the source code for Redline Smalltalk.

When you can do the following commands from your command prompt and get the associated results your environment is ready for Redline Smalltalk. Note: '>' represents the prompt on your command line / shell.

            > javac -version
            javac 1.8.0_25

            > mvn -v
            Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T21:57:37+10:00)

            > git --version
            git version 2.7.4

*Note: Java versions 1.8 or greater and Maven version 3.0 or greater is ok.

Getting The Source Code

You will need to get the Redline Smalltalk source code checked out from the GitHub repository into a folder where you want to build Redline Smalltalk. Git will check out the source into a subfolder so the folder you should make and cd (change directory) into should be a level above. For example, I put my projects in a 'dev' folder so I would be in that folder when I get the source code. To get the source code execute the following command:

            > git clone

Compiling the Source Code

To compile the Redline Smalltalk source code you need to be in the 'redline-smalltalk' folder and execute the following command:

            > mvn clean package

The first time you issue this command Apache Maven will go out to the internet and fetch a lot of dependencies, and this may take a lot of time. This happens only the first time, and subsequent runs will be much quicker. When Maven has completed you should see the following output:

            [INFO] ------------------------------------------------------------------------
            [INFO] BUILD SUCCESS
            [INFO] ------------------------------------------------------------------------
            [INFO] Total time: 6.383s

This process has built and Redline Smalltalk Java Archive and run a few tests against it. All of the build outputs we care about are in the 'target' sub-folder.

Executing Hello World

Redline Smalltalk comes with a few examples and one such example is a simple 'Hello World' script that displays a message on your screen. Note that this is 'Hello World' example is a Smalltalk script and not a class, as Redline Smalltalk can be used for simple scripts as well as full applications. Of course there are example classes as well. To execute the example you need to follow these steps from your command prompt:

            >java -jar target/redline-0.6-SNAPSHOT.jar st.redline.script.HelloWorld

You should see the following message from Redline Smalltalk (CURRENTLY WITH A LOT OF DEBUG):
            Hello World from Redline Smalltalk.

You can see the script for the Hello World example under the 'script' sub-folder. By convention Redline and Java keep source files in sub-folders that correspond to the namespace of the class or script. So can be found in the sub-folder 'st/redline'. Please take a moment to look at the contents of this file.

This process has got the latest Redline Smalltalk source code, built it and ran a Smalltalk example. You may want to put the resulting Redline Smalltalk code elsewhere on your system. If you do want to do this then copy the JAR from the target folder to that location and be sure to set and export the REDLINE_HOME environment variable to that location.

You are now ready to work with Redline.