samer@0: *** This was extracted from the libjavareadline 0.7.3 distribution. samer@0: *** The jar will not work unless the correct native libraries are samer@0: *** present, so the best thing is to install libreadline-java independently. samer@0: *** samer@0: *** Samer Abdallah 20/8/04 (jslab v 0.1) samer@0: *** samer@0: samer@0: This is my "port" of GNU-Readline to Java. Actually, it is a crude wrapper samer@0: using the Java Native Interface (JNI). samer@0: samer@0: Starting from version 0.6, alternative libraries are supported. Currently samer@0: only Editline is implemented, but adding support for other implementations samer@0: should be easy. samer@0: From 0.6 on, JavaReadline also has a fallback solution (System.in) for samer@0: platforms without Readline or Editline support, making your programs portable samer@0: again. samer@0: samer@0: This version implements basic readline functionality like line editing and samer@0: filename completion, which should be just enough for normal use. Not all samer@0: functionality is available with all implementations. samer@0: samer@0: Various people contributed code (see the file NEWS for details). samer@0: Since I changed some of the code, all bugs are my fault and bugreports samer@0: should be adressed to me. samer@0: samer@0: The binary distribution contains the API documentation, a JAR with the samer@0: Readline class and the shared libraries libJavaReadline.so and samer@0: libJavaEditline.so. It was compiled running Linux 2.2.18 with glibc 2.2. samer@0: samer@0: The source distribution contains all the source (I hope this doesn't surprise samer@0: you ;-) and a system of makefiles. You need the JDK to compile it. samer@0: samer@0: samer@0: LICENSING ISSUES samer@0: ================ samer@0: samer@0: Although JavaReadline is distributed under the LGPL, the underlying samer@0: Readline library is GPL code. The consequence is, that any program samer@0: linking with JavaReadline+Readline, will fall under the GPL. samer@0: samer@0: There is a Readline replacement called Editline with a more liberal samer@0: license. Use that library if you want to distribute your program samer@0: under the LGPL instead of the GPL. samer@0: samer@0: You can fetch the Editline stuff at http://packages.debian.org. You samer@0: need libedit2 and libedit-dev. Source code is also available, although samer@0: I must admit I did not succeed in compiling it on my non-BSD and samer@0: non-Debian system :-( samer@0: samer@0: samer@0: COMPILATION samer@0: =========== samer@0: samer@0: Compilation should be no problem. Try "make". You should set the samer@0: variable JAVA_HOME (or edit the makefile). Also, if you don't use jikes, samer@0: you should change the variables JAVAC and JAVAC_OPT in the makefile. A better samer@0: alternative is to install jikes, it will speed up your development by samer@0: a factor of 2-3. samer@0: samer@0: If you don't have the Editline libraries installed, use samer@0: "make T_LIBS=JavaReadline" (the default creates both JavaReadline and samer@0: JavaEditline). samer@0: samer@0: samer@0: INSTALLATION samer@0: ============ samer@0: samer@0: Copy the files libJava*.so to one of your library directories or add samer@0: the directory where you put libJava*.so to LD_LIBARY_PATH. Also, add samer@0: java_readline.jar to your CLASSPATH. After building the jar and the shared samer@0: library, you can run a program with something like: samer@0: samer@0: LD_LIBRARY_PATH=/usr/lib java -cp java_readline.jar org.foo.bar.MyClass samer@0: samer@0: assuming that you put libJava*.so into /usr/lib. samer@0: samer@0: samer@0: DEBIAN samer@0: ====== samer@0: samer@0: Thanks to Ben Burton, Debian-packages for JavaReadline are available! samer@0: samer@0: samer@0: SUPPORT samer@0: ======= samer@0: samer@0: If you think you found a bug or want to contribute some code please drop samer@0: me a note. samer@0: samer@0: Bernhard Bablok samer@0: mail@bablokb.de samer@0: http://www.bablokb.de samer@0: