source: trunk/j/doc/building.html @ 2

Last change on this file since 2 was 2, checked in by piso, 18 years ago

Initial checkin.

File size: 3.8 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2
3<html>
4
5<head>
6<title>J User's Guide - Building the Source</title>
7<LINK REL="stylesheet" HREF="j.css" TYPE="text/css">
8</head>
9
10<body>
11
12<a href="contents.html">Top</a>
13
14<hr>
15
16<h1>Building the Source</h1>
17
18<hr>
19
20<p>
21<b>Using configure and make</b>
22<p>
23For Linux:
24
25<pre>
26    $ ./configure --with-jdk=DIR
27    $ make
28    $ make install
29</pre>
30
31The <code>--with-jdk</code> option is <b>always</b> required,
32in order to specify which JDK to use (give the full path of its top-level directory).
33<p>
34You can use the <code>--with-extensions</code> option to specify extensions to
35the <code>CLASSPATH</code>. For example, you may want to build j with XML
36parser support:
37<pre>
38    $ ./configure ... --with-extensions=/usr/share/java/xerces.jar
39</pre>
40Extensions specified in this way are added to the <code>CLASSPATH</code> both
41during the build process and at runtime.
42<p>
43If you want to use certain experimental features such as shell and telnet
44buffers, you should specify the <code>--enable-jpty</code> option (you will
45also need to set <code>enableExperimentalFeatures=true</code>
46in your <a href="preferences.html">preferences</a> file).
47<p>
48For Windows, you'll need the
49<a href="http://sourceware.cygnus.com/cygwin/">Cygwin</a> tools, and you'll need
50to be running bash as your shell.  You can use the Cygwin drive notation (if
51need be) to specify the location of your JDK:
52<pre>
53    $ ./configure --with-jdk=//c/jdk1.3
54</pre>
55
56In addition, you must specify the --unix option when invoking make:
57
58<pre>
59    $ make --unix
60    $ make --unix install
61</pre>
62
63As an alternative, you can set the MAKE_MODE environment variable before running make:
64
65<pre>
66    $ export MAKE_MODE=unix
67    $ make
68    $ make install
69</pre>
70
71By default, j will be installed in /usr/local/bin, which may not be what you
72want if you're running Windows.
73<p>
74After you've built and installed j, you should be able to invoke it from the
75command line by just typing
76<pre>
77    $ j
78</pre>
79if /usr/local/bin is in your PATH.
80<p>
81<b>If you're not using Java 1.4...</b>
82<p>
83If you're not using Java 1.4 to build j, you'll get errors compiling the files
84MouseWheelListener.java and WindowStateListener.java (in src/org/armedbear/j).
85These files contain code specific to Java 1.4. These errors can safely be
86ignored. The classes in question will be loaded dynamically if they exist, but
87they are not required.
88<p>
89If you don't like the compilation errors, you can delete
90MouseWheelListener.java and WindowStateListener.java, use Java 1.4, or use the
91Ant-based build system (see below).
92<p>
93<b>Using Ant</b>
94<p>
95Starting with version 0.11.2, j also comes with an
96<a href="http://jakarta.apache.org/ant">Ant</a>-based build system. Version
971.4.1 of Ant is required.
98<p>
99Change into the root directory of the j source distribution and edit the file
100build.properties to suit your situation:
101<dl>
102  <dd>
103      <p>
104      If you're not planning to use Java 1.4, you can leave jdk14 unset in
105      build.properties; the source files that require 1.4
106      (MouseWheelListener.java and WindowStateListener.java) just won't get
107      built in that case.
108      <p>
109      If you want to use Java 1.4 and you don't care about earlier versions of
110      Java, the simplest thing to do is to point both jdk and jdk14 at your
111      Java 1.4 JDK.
112      <p>
113      You can also point jdk at your Java 1.3 JDK and jdk14 at your Java 1.4
114      JDK, and the resulting j.jar will work with either 1.3 or 1.4; the
115      distribution binaries are built this way.
116  </dd>
117</dl>
118<p>
119Then:
120<pre>
121    $ ant all
122    $ ant install
123</pre>
124This will install j in /usr/local/bin.
125<p>
126In theory, since Ant is a Java-based, cross-platform tool, the Ant build
127system should work on Windows too, but it has only been tested on Linux. Minor
128adjustments may be required to get it to work correctly on Windows.
129</body> </html>
Note: See TracBrowser for help on using the repository browser.