Installing and running on Windows

Installing and running on Windows

RESTx comes with convenient install, command and control scripts for Linux/Unix. We are still working on a similar set of scripts for Windows. In the meantime, please follow these instructions manually.

Prerequisites: The Java 6 JRE or JDK

Install a Java 6 JDK or JRE. Note that the JDK is needed in case you wish to create your own Java components or wish to compile the sources. Set JAVA_HOME to point to the JDK or JRE. For example,

C:\>set JAVA_HOME=C:\Program Files\Java\jre6
C:\>echo %JAVA_HOME%
C:\Program Files\Java\jre6

Install Jython 2.5.1

Download Jython 2.5.1. Follow the Jython installation instructions. This example uses C:\jython2.5.1 for the JYTHON_HOME folder. Set the JYTHON_HOME environment variable. For example:

C:\> set JYTHON_HOME=C:\jython2.5.1

Download RESTx

Download the and unpack the RESTx-0.9.4.zip file. Set the RESTX_HOME environment variable and change into that directory. For example (depending on your download and unpack location):

C:\>set RESTX_HOME=C:\Program Files\RESTx-0.9.4
C:\>cd %RESTX_HOME%

Setting the CLASSPATH

To tell Java about the location of RESTx's JAR files and classes, set the CLASSPATH environment variable:

C:>set CLASSPATH=%RESTX_HOME%\src\java;%RESTX_HOME%\lib\*

Setting up easy_install and simplejson

Simplejson is a very common package, which we need for RESTx. The best way to install it for your new Jython install is to set up easy_install, which is a standard script for Python package installation. With easy_install, additional Python packages can be downloaded and installed from centralized Python repositories.

From your RESTx home directory, you just need to run the following two commands. A proper simplejson package will be found, downloaded and installed for you.

C:>jython tools\ez_setup.py
C:>jython %JYTHON_HOME%\bin\easy_install simplejson

Start the RESTx server

From your RESTx home directory, issue this command:

C:>jython src\python\starter.py

Now view the results: http://localhost:8001/