bb6b92bd34
precise, it is a JNI-wrapper to Readline. It is distributed under the LGPL. You must call Readline.load(ReadlineLibrary lib); before using any other methods. If you omit the call to the load()-method, the pure Java fallback solution is used. Possible values for lib are: ReadlineLibrary.PureJava ReadlineLibrary.GnuReadline ReadlineLibrary.Editline ReadlineLibrary.Getline Note that all programs using GnuReadline will fall under the GPL, since Gnu-Readline is GPL software! WWW: http://sourceforge.net/projects/java-readline/ PR: ports/116817 Submitted by: Martin Kammerhofer <mkamm at gmx.net>
48 lines
1.2 KiB
Bash
48 lines
1.2 KiB
Bash
#!/bin/sh
|
|
# Invoke Jython.
|
|
# jython.sh,v 1.5 2007/09/28 09:13:55 martin Exp
|
|
#
|
|
# The path names below are for Jython 2.2 on FreeBSD.
|
|
#
|
|
|
|
CP="/usr/local/lib/jython22/jython.jar"
|
|
defs=
|
|
wrapper=
|
|
|
|
case "${JYTHON_CONSOLE:-Editline}" in
|
|
*[Ee]dit[Ll]ine)
|
|
CP="$CP:/usr/local/share/java/classes/libreadline-java.jar"
|
|
defs="-Dpython.console=org.python.util.ReadlineConsole"
|
|
defs="$defs -Dpython.console.readlinelib=Editline"
|
|
;;
|
|
*[Gg]et[Ll]ine)
|
|
CP="$CP:/usr/local/share/java/classes/libreadline-java.jar"
|
|
defs="-Dpython.console=org.python.util.ReadlineConsole"
|
|
defs="$defs -Dpython.console.readlinelib=Getline"
|
|
;;
|
|
*[Jj][Ll]ine)
|
|
CP="$CP:/usr/local/share/java/classes/jline.jar"
|
|
defs="-Dpython.console="
|
|
wrapper=jline.ConsoleRunner
|
|
;;
|
|
*[Rr]ead[Ll]ine)
|
|
CP="$CP:/usr/local/share/java/classes/libreadline-java.jar"
|
|
defs="-Dpython.console=org.python.util.ReadlineConsole"
|
|
defs="$defs -Dpython.console.readlinelib=GnuReadline"
|
|
;;
|
|
*)
|
|
echo >&2 "$0: illegal value of JYTHON_CONSOLE: $JYTHON_CONSOLE"
|
|
exit 64
|
|
;;
|
|
esac
|
|
|
|
|
|
if [ -n "$CLASSPATH" ]; then
|
|
CP="$CP:$CLASSPATH"
|
|
fi
|
|
|
|
exec java -Dpython.home="/usr/local/lib/jython22" \
|
|
-Dpython.cachedir="${HOME}/.jython-cachedir" \
|
|
-classpath "$CP" $wrapper org.python.util.jython $defs "$@"
|
|
|
|
#EOF#
|