| 1 | <!DOCTYPE html> |
|---|
| 2 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
|---|
| 3 | <head> |
|---|
| 4 | <title>Installing armedbear the Java way</title> |
|---|
| 5 | <base href=""/> |
|---|
| 6 | <link rel="stylesheet" |
|---|
| 7 | type="text/css" |
|---|
| 8 | href="abcl-css.css"/> |
|---|
| 9 | <link rel="stylesheet" |
|---|
| 10 | type="text/css" |
|---|
| 11 | href="http://common-lisp.net/project/armedbear/style.css"/> |
|---|
| 12 | |
|---|
| 13 | <meta charset="utf-8"/> |
|---|
| 14 | </head> |
|---|
| 15 | |
|---|
| 16 | <body> |
|---|
| 17 | <a name="top"></a> |
|---|
| 18 | <div class="header"><h1>armedbear</h1></div> |
|---|
| 19 | |
|---|
| 20 | <a href="http://common-lisp.net/project/armedbear/">home</a> |
|---|
| 21 | |
|---|
| 22 | <div id="welcome"> |
|---|
| 23 | <pre> |
|---|
| 24 | C:\temp\abcl\abcl-src-0.12.0\dist>java -jar abcl.jar |
|---|
| 25 | Armed Bear Common Lisp 0.12.0 |
|---|
| 26 | Java 1.6.0_05 Sun Microsystems Inc. |
|---|
| 27 | Java HotSpot(TM) Client VM |
|---|
| 28 | Low-level initialization completed in 1.262 seconds. |
|---|
| 29 | Startup completed in 4.556 seconds. |
|---|
| 30 | Type ":help" for a list of available commands. |
|---|
| 31 | CL-USER(1): (list 'welcome 'to 'lisp!) |
|---|
| 32 | (WELCOME TO LISP!) |
|---|
| 33 | CL-USER(2): |
|---|
| 34 | </pre> |
|---|
| 35 | </div> |
|---|
| 36 | <h1>Starting ABCL</h1> |
|---|
| 37 | |
|---|
| 38 | <p> |
|---|
| 39 | When you start ABCL you can pass it command line arguments. Currently (at |
|---|
| 40 | version 12) it supports the following arguments: |
|---|
| 41 | </p> |
|---|
| 42 | |
|---|
| 43 | <ul> |
|---|
| 44 | <li><tt>--noinit</tt> If you have defined an <a href="#noinit"> |
|---|
| 45 | initialisation file</a> you can use this option to prevent this file |
|---|
| 46 | from being processed when the application starts. |
|---|
| 47 | </li> |
|---|
| 48 | <li><tt>--noinform</tt> <a href="#noinform">Suppresses the |
|---|
| 49 | information</a> that is normally printed when the application starts. |
|---|
| 50 | </li> |
|---|
| 51 | <li><tt>--batch</tt> See <a href="#batch">batch</a> below. |
|---|
| 52 | </li> |
|---|
| 53 | <li><tt>--eval</tt> See <a href="#eval">eval</a> below.This requires |
|---|
| 54 | an argument. |
|---|
| 55 | </li> |
|---|
| 56 | <li><tt>--load</tt> See <a href="#load">load</a> below. This requires |
|---|
| 57 | an argument. |
|---|
| 58 | </li> |
|---|
| 59 | <li><tt>--load-system-file</tt> See |
|---|
| 60 | <a href="#loadsysfile">load-system-file</a> below. This |
|---|
| 61 | requires an argument. |
|---|
| 62 | </li> |
|---|
| 63 | </ul> |
|---|
| 64 | |
|---|
| 65 | <p> |
|---|
| 66 | </p> |
|---|
| 67 | |
|---|
| 68 | <a name="noinform"></a> |
|---|
| 69 | <h2>The --noinform option</h2> |
|---|
| 70 | <p> |
|---|
| 71 | The <tt>--noinform</tt> option stops the normal startup messsages from appearing. |
|---|
| 72 | A normal startup will look something like this: |
|---|
| 73 | </p> |
|---|
| 74 | |
|---|
| 75 | <pre> |
|---|
| 76 | C:\temp\abcl\abcl-src-0.12.0\dist>java -jar abcl.jar |
|---|
| 77 | Armed Bear Common Lisp 0.12.0 |
|---|
| 78 | Java 1.6.0_05 Sun Microsystems Inc. |
|---|
| 79 | Java HotSpot(TM) Client VM |
|---|
| 80 | Low-level initialization completed in 1.262 seconds. |
|---|
| 81 | Startup completed in 4.556 seconds. |
|---|
| 82 | Type ":help" for a list of available commands. |
|---|
| 83 | CL-USER(1): |
|---|
| 84 | </pre> |
|---|
| 85 | |
|---|
| 86 | <p> |
|---|
| 87 | To stop the above messages from appearing simply add the <tt>--noinform</tt> |
|---|
| 88 | option to the end of the comand line: |
|---|
| 89 | </p> |
|---|
| 90 | |
|---|
| 91 | <pre> |
|---|
| 92 | C:\temp\abcl\abcl-src-0.12.0\dist>java -jar abcl.jar --noinform |
|---|
| 93 | CL-USER(1): |
|---|
| 94 | </pre> |
|---|
| 95 | |
|---|
| 96 | <a name="batch"></a> |
|---|
| 97 | <a href="#top">top</a> |
|---|
| 98 | <h2>The --batch option</h2> |
|---|
| 99 | <p> |
|---|
| 100 | <i>It is currently not known what this option does.</i> |
|---|
| 101 | </p> |
|---|
| 102 | |
|---|
| 103 | |
|---|
| 104 | <a name="eval"></a> |
|---|
| 105 | <a href="#top">top</a> |
|---|
| 106 | <h2>The --eval option</h2> |
|---|
| 107 | <p> |
|---|
| 108 | <i>It is currently not known what this option does.</i> |
|---|
| 109 | No idea what this does, but under Linux it seems to mess up the keystrokes. |
|---|
| 110 | If you start your <a href="abcl-install-with-java.html#linux">Lisp under |
|---|
| 111 | Linux</a>, the keystrokes are not recognised. Consider starting ABCL Lisp with |
|---|
| 112 | this command: <tt>lisp --eval "(+ 1 2)"</tt>. When you try to use the arrow |
|---|
| 113 | keys (up, right, down and left) you get: |
|---|
| 114 | </p> |
|---|
| 115 | |
|---|
| 116 | <pre> |
|---|
| 117 | [localhost ~]$ lisp --eval "(+ 1 2)" |
|---|
| 118 | Armed Bear Common Lisp 0.12.0 |
|---|
| 119 | Java 1.6.0 IBM Corporation |
|---|
| 120 | IBM J9 VM |
|---|
| 121 | Low-level initialization completed in 0.639 seconds. |
|---|
| 122 | Startup completed in 2.221 seconds. |
|---|
| 123 | Type ":help" for a list of available commands. |
|---|
| 124 | CL-USER(1): ^[[A^[[C^[[B^[[D |
|---|
| 125 | </pre> |
|---|
| 126 | |
|---|
| 127 | |
|---|
| 128 | <a name="load"></a> |
|---|
| 129 | <a href="#top">top</a> |
|---|
| 130 | <h2>The --load option</h2> |
|---|
| 131 | <p> |
|---|
| 132 | This option must be followed by a filename. It allows you to load a file when |
|---|
| 133 | the Lisp system starts. Consider the following Lisp file; it conists of a |
|---|
| 134 | single form: |
|---|
| 135 | </p> |
|---|
| 136 | |
|---|
| 137 | <pre> |
|---|
| 138 | (format t "Hello world") |
|---|
| 139 | </pre> |
|---|
| 140 | |
|---|
| 141 | <p> |
|---|
| 142 | If this file is saved in your home directory in Linux and is called |
|---|
| 143 | <tt>test.lisp</tt>, you can load the file into Lisp with <tt>lisp --load |
|---|
| 144 | ~/test.lisp</tt>. Now, when Lisp starts up you will see: |
|---|
| 145 | </p> |
|---|
| 146 | |
|---|
| 147 | <pre> |
|---|
| 148 | [localhost ~]$ pwd |
|---|
| 149 | /home/test-user |
|---|
| 150 | [localhost ~]$ cat test.lisp |
|---|
| 151 | (format t "Hello World!") |
|---|
| 152 | [localhost ~]$ lisp --load ~/test.lisp |
|---|
| 153 | Armed Bear Common Lisp 0.12.0 |
|---|
| 154 | Java 1.6.0 IBM Corporation |
|---|
| 155 | IBM J9 VM |
|---|
| 156 | Low-level initialization completed in 0.686 seconds. |
|---|
| 157 | Startup completed in 2.325 seconds. |
|---|
| 158 | Hello World! |
|---|
| 159 | Type ":help" for a list of available commands. |
|---|
| 160 | CL-USER(1): |
|---|
| 161 | </pre> |
|---|
| 162 | |
|---|
| 163 | <p> |
|---|
| 164 | </p> |
|---|
| 165 | |
|---|
| 166 | <a name="loadsysfile"></a> |
|---|
| 167 | <a href="#top">top</a> |
|---|
| 168 | <h2>The --load-system-file option</h2> |
|---|
| 169 | <p> |
|---|
| 170 | This looks for lisp files. If there is no extension it tries an extension of |
|---|
| 171 | <tt>.abcl</tt>, <tt>.lisp</tt> (from <tt>Load.loadSystemFile()</tt>) |
|---|
| 172 | </p> |
|---|
| 173 | |
|---|
| 174 | |
|---|
| 175 | <a name="noinit"></a><a href="#top">top</a> |
|---|
| 176 | <h2>ABCL initialisation file</h2> |
|---|
| 177 | <p> |
|---|
| 178 | ABCL supports an initialisation file, with the expected name of <tt>.abclrc</tt> |
|---|
| 179 | The system looks for this file in the directory specified by the Java system |
|---|
| 180 | property <tt>user.home</tt>. This property should point to the user's home |
|---|
| 181 | directory. If this file does not exist, then for Windows users the next place |
|---|
| 182 | to look for it is in the root directory of the <tt>c:</tt> drive: |
|---|
| 183 | <tt>C:\.abclrc</tt>. If this does not exist, the file <tt>.ablrc</tt> in the |
|---|
| 184 | user's home directory is tried next; this option is depcrecated and only exists |
|---|
| 185 | for backward compatibility. You should use <tt>.abclrc</tt> instead. Finally |
|---|
| 186 | if all the above fail the last filename searched for is <tt>.ablisprc</tt>. |
|---|
| 187 | </p> |
|---|
| 188 | |
|---|
| 189 | <p> |
|---|
| 190 | As an example, make sure you are in your home directory, and create a file |
|---|
| 191 | called <tt>.abclrc</tt>. To demonstrate that this works enter the following |
|---|
| 192 | Lisp form into this file: <tt>(setf x 3)</tt>. This will set the special |
|---|
| 193 | variable <tt>x</tt> to the value 3. Now simply start Lisp, and query the |
|---|
| 194 | variable <tt>x</tt>: |
|---|
| 195 | </p> |
|---|
| 196 | |
|---|
| 197 | <pre> |
|---|
| 198 | C:\temp\abcl\abcl-src-0.12.0\dist>java -jar abcl.jar |
|---|
| 199 | CL-USER(1): x |
|---|
| 200 | 3 |
|---|
| 201 | </pre> |
|---|
| 202 | |
|---|
| 203 | <p> |
|---|
| 204 | The initialisation file is loaded before any other file is loaded. |
|---|
| 205 | </p> |
|---|
| 206 | |
|---|
| 207 | <div class="footer"> |
|---|
| 208 | <hr /> |
|---|
| 209 | <p>Hosted as part of <a href="https://common-lisp.net/">common-lisp.net</a></p> |
|---|
| 210 | </div> |
|---|
| 211 | |
|---|
| 212 | </body> |
|---|
| 213 | </html> |
|---|