ClarkUpdike, incept: 2005-02-10

Setting up the jython development environment in Eclipse

Eclipse is a CVS client and can be used to get the project from the repository. It takes a few steps to set it up, but seems to work nice once you do. Please correct any mistakes. (Works for Eclipse 3.0.1)

Creating the project using CVS

Anchor(CVS) At a high level, you need to:

Detailed Steps

Building the project using ANT

Anchor(ANT) At this point, you should be able to build the project using Eclipse's Java Builder. This will only compile the classes though --you'll want to use <yourProjectName>/jython/build.xml to get the full ant build. To do this:

    build.compiler=modern
    debug=on
    optimize=off

    #javaccHome=/Users/bzimmer/Library/Java/Extras/javacc-3.2

    ht2html.dir=
    #python.home=
    python.lib=<pythonHome>\\Lib
    python.exe=<pythonHome>\\

    ### zxJDBC ###
    #oracle.jar=
    #mysql.jar=/Users/bzimmer/Library/Java/Extras/mysql-connector-java-3.1.6-bin.jar
    #informix.jar=
    #postgresql.jar=/Users/bzimmer/Library/Java/Extras/pg74.215.jdbc2.jar
    #jdbc.jar=
    #servlet.jar=

A successful build should output something like the following:

Buildfile: c:\workspace\JythonTip\jython\build.xml
init:
     [echo] --- Build environment for jython ---
     [echo] --- Flags (Note: If the {property name} is displayed,
     [echo] --- then the component is not present)
     [echo] --- Optional Libraries ---
     [echo] java2 coll  = true
     [echo] servlet     = ${servlet.present}
     [echo] readline    = ${readline.present}
     [echo] oracle      = ${oracle.present}
     [echo] informix    = ${informix.present}
     [echo] mysql       = ${mysql.present}
     [echo] postgresql  = ${postgresql.present}
     [echo] jndi        = true
     [echo] jdbc        = true
     [echo] jdbc3.0     = true
dist-prepare:
prepare:
parser:
compile:
jar:
   [delete] Deleting: C:\workspace\JythonTip\jython\build\mainClass.mf
copy-xml:
copy-dist:
BUILD SUCCESSFUL
Total time: 2 seconds

Note that this sample was actually a re-build, so it didn't do that much (you'll see more output on the first build) and ran pretty fast (2 seconds). Also, note that I did not link in the optional "user-supply-able" jars. To do so, just add those entries to your ant.properties (look for the placeholders).

And here is a [wiki:/JythonDeveloperGuide sample batch file (windows)] that runs the eclipse-built jython.jar