samer@0
|
1 *** This was extracted from the libjavareadline 0.7.3 distribution.
|
samer@0
|
2 *** The jar will not work unless the correct native libraries are
|
samer@0
|
3 *** present, so the best thing is to install libreadline-java independently.
|
samer@0
|
4 ***
|
samer@0
|
5 *** Samer Abdallah 20/8/04 (jslab v 0.1)
|
samer@0
|
6 ***
|
samer@0
|
7
|
samer@0
|
8 This is my "port" of GNU-Readline to Java. Actually, it is a crude wrapper
|
samer@0
|
9 using the Java Native Interface (JNI).
|
samer@0
|
10
|
samer@0
|
11 Starting from version 0.6, alternative libraries are supported. Currently
|
samer@0
|
12 only Editline is implemented, but adding support for other implementations
|
samer@0
|
13 should be easy.
|
samer@0
|
14 From 0.6 on, JavaReadline also has a fallback solution (System.in) for
|
samer@0
|
15 platforms without Readline or Editline support, making your programs portable
|
samer@0
|
16 again.
|
samer@0
|
17
|
samer@0
|
18 This version implements basic readline functionality like line editing and
|
samer@0
|
19 filename completion, which should be just enough for normal use. Not all
|
samer@0
|
20 functionality is available with all implementations.
|
samer@0
|
21
|
samer@0
|
22 Various people contributed code (see the file NEWS for details).
|
samer@0
|
23 Since I changed some of the code, all bugs are my fault and bugreports
|
samer@0
|
24 should be adressed to me.
|
samer@0
|
25
|
samer@0
|
26 The binary distribution contains the API documentation, a JAR with the
|
samer@0
|
27 Readline class and the shared libraries libJavaReadline.so and
|
samer@0
|
28 libJavaEditline.so. It was compiled running Linux 2.2.18 with glibc 2.2.
|
samer@0
|
29
|
samer@0
|
30 The source distribution contains all the source (I hope this doesn't surprise
|
samer@0
|
31 you ;-) and a system of makefiles. You need the JDK to compile it.
|
samer@0
|
32
|
samer@0
|
33
|
samer@0
|
34 LICENSING ISSUES
|
samer@0
|
35 ================
|
samer@0
|
36
|
samer@0
|
37 Although JavaReadline is distributed under the LGPL, the underlying
|
samer@0
|
38 Readline library is GPL code. The consequence is, that any program
|
samer@0
|
39 linking with JavaReadline+Readline, will fall under the GPL.
|
samer@0
|
40
|
samer@0
|
41 There is a Readline replacement called Editline with a more liberal
|
samer@0
|
42 license. Use that library if you want to distribute your program
|
samer@0
|
43 under the LGPL instead of the GPL.
|
samer@0
|
44
|
samer@0
|
45 You can fetch the Editline stuff at http://packages.debian.org. You
|
samer@0
|
46 need libedit2 and libedit-dev. Source code is also available, although
|
samer@0
|
47 I must admit I did not succeed in compiling it on my non-BSD and
|
samer@0
|
48 non-Debian system :-(
|
samer@0
|
49
|
samer@0
|
50
|
samer@0
|
51 COMPILATION
|
samer@0
|
52 ===========
|
samer@0
|
53
|
samer@0
|
54 Compilation should be no problem. Try "make". You should set the
|
samer@0
|
55 variable JAVA_HOME (or edit the makefile). Also, if you don't use jikes,
|
samer@0
|
56 you should change the variables JAVAC and JAVAC_OPT in the makefile. A better
|
samer@0
|
57 alternative is to install jikes, it will speed up your development by
|
samer@0
|
58 a factor of 2-3.
|
samer@0
|
59
|
samer@0
|
60 If you don't have the Editline libraries installed, use
|
samer@0
|
61 "make T_LIBS=JavaReadline" (the default creates both JavaReadline and
|
samer@0
|
62 JavaEditline).
|
samer@0
|
63
|
samer@0
|
64
|
samer@0
|
65 INSTALLATION
|
samer@0
|
66 ============
|
samer@0
|
67
|
samer@0
|
68 Copy the files libJava*.so to one of your library directories or add
|
samer@0
|
69 the directory where you put libJava*.so to LD_LIBARY_PATH. Also, add
|
samer@0
|
70 java_readline.jar to your CLASSPATH. After building the jar and the shared
|
samer@0
|
71 library, you can run a program with something like:
|
samer@0
|
72
|
samer@0
|
73 LD_LIBRARY_PATH=/usr/lib java -cp java_readline.jar org.foo.bar.MyClass
|
samer@0
|
74
|
samer@0
|
75 assuming that you put libJava*.so into /usr/lib.
|
samer@0
|
76
|
samer@0
|
77
|
samer@0
|
78 DEBIAN
|
samer@0
|
79 ======
|
samer@0
|
80
|
samer@0
|
81 Thanks to Ben Burton, Debian-packages for JavaReadline are available!
|
samer@0
|
82
|
samer@0
|
83
|
samer@0
|
84 SUPPORT
|
samer@0
|
85 =======
|
samer@0
|
86
|
samer@0
|
87 If you think you found a bug or want to contribute some code please drop
|
samer@0
|
88 me a note.
|
samer@0
|
89
|
samer@0
|
90 Bernhard Bablok
|
samer@0
|
91 mail@bablokb.de
|
samer@0
|
92 http://www.bablokb.de
|
samer@0
|
93
|