aejaks.sourceforge.net

Running


Running

Starting Æjaks

Running Æjaks requires Java 1.5 or higher. If you don't have Java already, you can download Java from http://www.oracle.com/technetwork/java/index.html. Get the JRE package if you just want to run Æjaks, or the JDK if you want to develop additional Java components for Æjaks. For new installations, Java 1.6 or higher is recommended.

The Jetty web server is shipped with Æjaks to run out of the box. You can also use Tomcat, or any other Java Servlet engine to run Æjaks. All required libraries are bundled into the aejaks.war file.

To start Æjaks running the sample programs, execute the run.sh shell script (Unix/Linux/MacOSX), or run (run.bat, Windows). Shell users can execute stop.sh to stop the Jetty server, Windows users should press ^C in the console window. The Jetty server is ready when the message INFO org.mortbay.log - Started SelectChannelConnector is printed on your console. The H2 Database engine is also started when starting Æjaks. It is shutdown when stop.sh is run (Unix/Linx), or ^C in the H2 console window (Windows).

Sample Apps

After starting the Jetty web server, start your browser and go to http://localhost:8080/. The index page allows you to start the sample apps.

  • Widget Tour
    This application shows off some of the widgets in Æjaks. Besides playing with the widgets, a log is printed for actions (such as clicking a button) and source code that produced the demo can be inspected.

  • Æjaks Console
    The sample console application allows you to interactive program in Tcl and the Æjaks widgets. Because JTcl is a full interpretive language with capabilities to read and write files, execute other programs, invoke any Java object, precautions are taken to prevent misuse. The console app will only work for browsers that connect from the localhost (127.0.0.1). Futher, when the application is started, a random number is printed on the web server's stdout as a password. That password is then prompted by the user interface before continuing. containing your application files.

    NOTE THAT NO OTHER PRECAUTIONS ARE IN PLACE! The person running the console app basically has shell access to your system! containing your application files.

    For those running on Mac OSX, you may have to open the Applications -> Utilities -> Console application in order to see the Æjaks Console password is not printed to the window where run.sh was started..

  • Æjaks WarMachine GUI
    Æjaks WarMachine GUI is a wizard to build an application specific WAR file with your application, complete with the Æjaks runtime. Once you have built your WAR, you can deploy it in any Java Servlet engine. WarMachine GUI can be run locally or remotely; when running from localhost (127.0.0.1), enter the directory that contains your application files; when running remotely, upload a ZIP file containing your application files.

    Note that a command line version of WarMachine can also be run, see the mkAppWar.sh (Unix/Linux/MacOSX) and mkAppWar.bat (Windows) utilities in the top level distribution directory.

  • rolodex
    Æjaks Rolodex is a simple database application, using the MrPersister database package. This demo uses the H2 Database engine for database access (included in the Æjaks distribution.)

  • TclTutor
    TclTutor is an interactive tutor to help you learn the Tcl programming language. TclTutor provides an live interpreter so that you can safely try out code for each lesson presented. TclTutor is written by Clif Flynt and has been adapted to work in Æjaks. Please see the TclTutor home page for more information, and downloads to run the standalone versions for Unix/Linux, Windows, or Mac OSX. Since TclTutor makes a JTcl interpreter available for use by the user of the program, a password is printed in the Jetty console and must be entered.

  • Clock
    Clock is a simple text clock, showing off the Æjaks feature of asynchronous updating. Written and contributed by Geoffrey Wu.

  • NumberGuess
    NumberGuess is a re-implementation of the Echo2 tutorial application. The Æjaks/Tcl version is less than one-third the size of the Echo2/Java version. Written and contributed by Geoffrey Wu.