PyJ2D Module Guide

PyJ2D module was modelled on Pygame commands that permits scripts coded in Python/Pygame to run in the Java virtual machine (JVM) using the Jython interpreter. To use the PyJ2D module, place the pyj2d folder in the script folder or on the module path. Import pyj2d into the Python script, or use the statement 'import pyj2d as pygame' to maintain the Pygame commands.

To launch a desktop application, JVM must be installed and have Jython (https://www.jython.org/) by either installing Jython or obtaining a standalone jython.jar package. With Linux, Jython may be installed from the package manager. If Jython is installed use command 'jython script.py', or standalone method use command 'java -jar jython.jar script.py'. Some functionality requires jnumeric, refer to pyj2d/numeric.py for information, using command 'java -cp jython.jar:jnumeric-0.1.jar:$CLASSPATH org.python.util.jython script.py'. For information regarding online deployment check App.py, however this functionality has not been maintained. Running on JVM on the desktop was tested with Jython version 2.2.1, 2.5, and 2.7.

Further information is available on the PyJ2D project page (https://gatc.ca/projects/pyj2d/) and in the API documentation (https://gatc.ca/projects/pyj2d/doc/).

