source: public/content/doc/abcl-start.html

Last change on this file was 11930, checked in by ehuelsmann, 16 years ago

Add documentation on the website as provided by Phil Berry (2009pb at googlemail).

File size: 5.9 KB
Line 
1<?xml version="1.0"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5<head>
6<title>Installing armedbear the Java way</title>
7<base href="">
8<link rel="stylesheet"
9  type="text/css"
10  href="abcl-css.css">
11<link rel="stylesheet"
12  type="text/css"
13  href="http://common-lisp.net/project/armedbear/style.css"/>
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>
24C:\temp\abcl\abcl-src-0.12.0\dist>java -jar abcl.jar
25Armed Bear Common Lisp 0.12.0
26Java 1.6.0_05 Sun Microsystems Inc.
27Java HotSpot(TM) Client VM
28Low-level initialization completed in 1.262 seconds.
29Startup completed in 4.556 seconds.
30Type ":help" for a list of available commands.
31CL-USER(1): (list 'welcome 'to 'lisp!)
32(WELCOME TO LISP!)
33CL-USER(2):
34</pre>
35</div>
36<h1>Starting ABCL</h1>
37
38<p>
39When you start ABCL you can pass it command line arguments. Currently (at
40version 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>
71The <tt>--noinform</tt> option stops the normal startup messsages from appearing.
72A normal startup will look something like this:
73</p>
74
75<pre>
76C:\temp\abcl\abcl-src-0.12.0\dist>java -jar abcl.jar
77Armed Bear Common Lisp 0.12.0
78Java 1.6.0_05 Sun Microsystems Inc.
79Java HotSpot(TM) Client VM
80Low-level initialization completed in 1.262 seconds.
81Startup completed in 4.556 seconds.
82Type ":help" for a list of available commands.
83CL-USER(1):
84</pre>
85
86<p>
87To stop the above messages from appearing simply add the <tt>--noinform</tt>
88option to the end of the comand line:
89</p>
90
91<pre>
92C:\temp\abcl\abcl-src-0.12.0\dist>java -jar abcl.jar --noinform
93CL-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>
109No idea what this does, but under Linux it seems to mess up the keystrokes.
110If you start your <a href="abcl-install-with-java.html#linux">Lisp under
111Linux</a>, the keystrokes are not recognised. Consider starting ABCL Lisp with
112this command: <tt>lisp --eval "(+ 1 2)"</tt>. When you try to use the arrow
113keys (up, right, down and left) you get:
114</p>
115
116<pre>
117[localhost ~]$ lisp --eval "(+ 1 2)"
118Armed Bear Common Lisp 0.12.0
119Java 1.6.0 IBM Corporation
120IBM J9 VM
121Low-level initialization completed in 0.639 seconds.
122Startup completed in 2.221 seconds.
123Type ":help" for a list of available commands.
124CL-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>
132This option must be followed by a filename. It allows you to load a file when
133the Lisp system starts. Consider the following Lisp file; it conists of a
134single form:
135</p>
136
137<pre>
138(format t "Hello world")
139</pre>
140
141<p>
142If 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
153Armed Bear Common Lisp 0.12.0
154Java 1.6.0 IBM Corporation
155IBM J9 VM
156Low-level initialization completed in 0.686 seconds.
157Startup completed in 2.325 seconds.
158Hello World!
159Type ":help" for a list of available commands.
160CL-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>
170This 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>
178ABCL supports an initialisation file, with the expected name of <tt>.abclrc</tt>
179The system looks for this file in the directory specified by the Java system
180property <tt>user.home</tt>. This property should point to the user's home
181directory. If this file does not exist, then for Windows users the next place
182to 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
184user's home directory is tried next; this option is depcrecated and only exists
185for backward compatibility. You should use <tt>.abclrc</tt> instead. Finally
186if all the above fail the last filename searched for is <tt>.ablisprc</tt>.
187</p>
188
189<p>
190As an example, make sure you are in your home directory, and create a file
191called <tt>.abclrc</tt>. To demonstrate that this works enter the following
192Lisp form into this file: <tt>(setf x 3)</tt>. This will set the special
193variable <tt>x</tt> to the value 3. Now simply start Lisp, and query the
194variable <tt>x</tt>:
195</p>
196
197<pre>
198C:\temp\abcl\abcl-src-0.12.0\dist>java -jar abcl.jar
199CL-USER(1): x
2003
201</pre>
202
203<p>
204The initialisation file is loaded before any other file is loaded.
205</p>
206
207</body>
208</html>
Note: See TracBrowser for help on using the repository browser.