|
|
|||||||||||||||||||||||||||||||||||
|
InstallationJython is distributed as a self-extracting .class file created by LiftOff. To install Jython, open the command line to the directory in which you have placed the jython-21.class file and then type:
You will probably type one of the following three lines, depending on your system. Be sure not to put ".class" at the end of the file name.
It can be necessay to set the CLASSPATH to include the current directory
Which command to use depends on your operating system and java version. If you have more than one java installed, you may have to supply an explicit path the java command. When installing the JDK 1.2 from javasoft, the default is it install both the JDK and a plugin JRE. The plugin JRE is added to your PATH, so running the java jython-21 command will make jython use the JRE. Specify the full path if you want to use JDK instead, ie: c:\Programs\JDK1.2\bin\java -cp . jython-21. If you do not have a GUI, then add -o dir_to_install_to to the command above. Jython will install to the specified directory without bringing up the graphical installer. E.g. to install all modules to a Jython-2.1 subdirectory in the current directory do:
After completing installation, you should be able to run Jython by typing:
What Can Go WrongYou should check out this section if your Jython installation doesn't quite work right. It will contain tips for solving the most common problems. Can't Access Standard Python ModulesNot all the modules form CPython is available in Jython. Some modules require a C language dynamic link library that doesn't exists in java. Other modules are missing from Jython just because nobody have had a need for it before and no-one have tested the CPython module with Jython. If you discover that you are missing a module, try to copy the .py file from a CPython distribution to a directory on your Jython sys.path. If that works you are set. If it doesn't work, try asking on jython-users mailing list. Other ProblemsAny other problems with the installation should be reported to jython-dev. As a workaround you can extract the jython-21.class manually. The class file is basicly a .zip file and most unzip programs can manage to extract the contents of the class into a directory. After doing that, you must
Platform Specific NotesIf all else fails, you might find that your problem is unique to your platform, and has a solution mentioned on the Platform Specific Information page.
|