> tclsh(We will adopt the convention that lines starting with ">" are shell commands, while undecorated lines are commands to the Tcl interpreter.) In Windows, you can also start tclsh by selecting the appropriate entry from the Start menu.
Unfamiliar with Tcl?To access the Tcl Blend commands, you need to load the java package:
Tcl comes supplied in two versions. tclsh is just the Tcl interpreter -- when you start it you get a simple prompt (%), at which you can type Tcl commands, using any of the commands documented on the Tcl commands manual pages. wish is the windowing shell -- when you start it you get the same interactive console (on Windows you get a separate window) and access to the Tk graphical user interface commands documented on the Tk commands manual pages.
package require javaTcl will load the Tcl Blend shared library, load the Java classes used by Tcl Blend, and add a few commands to the Tcl interpreter.
What's a package?OK, we're ready to go! (If any of that didn't work, go to Christopher's Troubleshooting Tcl Blend page.) We can now type Tcl commands that create and manipulate Java objects. Click on each of the following links to step through the basic tutorial.
One of Tcl's great strengths is it's ability to be easily extended with new commands. These days, new commands are always supplied in a package, which is loaded and otherwise manipulated by the package command. Packages can be written in C, Tcl, or (as we will see) Java.