source: tags/0.12.0/j/doc/compilation.html

Last change on this file was 7787, checked in by piso, 20 years ago

Windows NT 4

File size: 3.3 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 the
24location in the source file where the error occurred. (Please note that on
25Windows, compilation buffers are only supported for Windows NT 4, Windows 2000
26and Windows XP.)
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 commands
62<a href="commands.html#nextError">nextError</a>, mapped by default to F4, and
63<a href="commands.html#previousError">previousError</a>, mapped by default to
64Shift F4, to jump to the location of each error in the source.
65</p>
66<p>
67In the compilation buffer itself, the command
68<a href="commands.html#thisError">thisError</a>, mapped by default to Enter,
69jumps to the location in the source file that corresponds to the error message
70at the current location of the caret.
71(<a href="commands.html#thisError">thisError</a> is also mapped by default to
72Ctrl Shift G, left button double click, and middle button single click.)
73</p>
74<p>
75The
76command <a href="commands.html#showMessage">showMessage</a>, mapped by default
77to Ctrl Shift M, displays the full text of the current error message.
78</p>
79<p>
80Note that when using jikes, you must specify the +D flag in the compile
81command (or Makefile) in order for j to be able to parse the error messages
82correctly:
83<pre>
84        jikes +D [...] here</pre>
85When using ant, you should set the build.compiler.emacs property:
86<pre>
87        build.compiler.emacs=on</pre>
88</body>
89
90</html>
Note: See TracBrowser for help on using the repository browser.