Jynx is installed as a Python package in the Jython distribution. For Jynx to run it is required to install
- Jython 2.5 or better
- JDK 1.6 or better
It is necessary to install a JDK, a JRE is not sufficient.
The JAVA_HOME environment variable must be set to your JDK directory.
Unpack Jynx and move to the Jynx root directory where you find a setup.py script. Then run
# jython setup.py install
Jynx will install two directories on site-packages:
- site-packages/jynx
- site-packages/org
For Jython classes to override protected methods of Java classes it is required to lower Javas access protection. Lowering access is mandatory for using dynamic Java compilation in Jynx as well as modifying the classpath from within Jython. It can be configured using the registry file of Jythons distribution. It shall be found here
<JYTHON-HOME>/registry
Open the registry file and set the option
python.security.respectJavaAccessibility = false
The Netbeans IDE offers a Jython plugin and installs it in <NETBEANS-PATH>/python1. In the subdirectory /jython-2.5 you’ll find the jython.jar file. If the registry file is missing here as is in my own case you have to put it in the directory with the changes mentioned above.
Jynx is a Jython library which makes life easier for Python programmers who intend to work within the Javaverse. Jynx, specifically uses dynamic Java compilation techniques that advance Python as a scripting language for Java.