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

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

Initial checkin.

File size: 3.0 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 - Compilation Buffers</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>Compilation Buffers</h1>
17
18<hr>
19
20<p>
21J can run compilers for languages like Java and C, redirecting the output into
22a compilation buffer. For some compilers, including javac, jikes, gcc, and
23Microsoft C/C++, j can also parse the compiler's error messages and jump to
24the location in the source file where the error occurred. (Please note that on
25Windows, compilation buffers are only supported for Windows 2000 and Windows
26XP.)
27</p>
28<p>
29The command <a href="commands.html#compile">compile</a>, mapped by default to
30F9, can be used to run make,
31<a href="http://jakarta.apache.org/ant/index.html">Ant</a>, or a compiler. You
32will be prompted for the compile command. The current directory (the directory
33of the file in the current buffer) is used as the working directory for the
34execution of the compile command, so if you're using make or Ant, the Makefile
35or build.xml in the current directory will be used by default.
36</p>
37<p>
38The command <a href="commands.html#recompile">recompile</a>, mapped by default
39to Ctrl F9, repeats the last compile command you specified. To make this
40command more useful, you can use the dynamic alias "here" in your compile
41command to represent the full pathname of the current file (the file in the
42current buffer).
43<p>
44For example, you could specify the compile command:
45<pre>
46        javac -classpath /home/peter/j/src here</pre>
47Then you could use <a href="commands.html#recompile">recompile</a> in any
48buffer containing a Java source file to run javac (with the specified
49classpath) on that particular file.
50<p>
51When you start a compilation, j displays the compilation buffer in another
52window, splitting the current window if necessary. Keyboard focus remains in
53the source window.
54</p>
55<p>
56If the compilation completes without error, you can use
57<a href="commands.html#escape">escape</a>, mapped by default to Escape, to
58kill the compilation buffer and unsplit the window.
59</p>
60<p>
61If there are errors, you can use the command
62<a href="commands.html#nextError">nextError</a>, mapped by default to F4, to
63jump to the location of each error in the source.
64</p>
65<p>
66In the compilation buffer itself, the command
67<a href="commands.html#thisError">thisError</a>, mapped by default to Enter,
68jumps to the location in the source file that corresponds to the error message
69at the current location of the caret.
70(<a href="commands.html#thisError">thisError</a> is also mapped by default to
71Ctrl Shift G, left button double click, and middle button single click.)
72</p>
73<p>
74The
75command <a href="commands.html#showMessage">showMessage</a>, mapped by default
76to Alt M, displays the full text of the current error message.
77</p>
78<p>
79Note that when using jikes, you must specify the +D flag in the compile
80command (or Makefile) in order for j to be able to parse the error messages
81correctly:
82<pre>
83        jikes +D [...] here</pre>
84</body>
85
86</html>
Note: See TracBrowser for help on using the repository browser.