File: bk01ch12.html

package info (click to toggle)
antelope 3.5.1-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 3,884 kB
  • sloc: java: 27,651; xml: 6,488; sh: 12; makefile: 5
file content (88 lines) | stat: -rw-r--r-- 6,038 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter12.Frequently Asked Questions</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="Antelope Users Guide"><link rel="up" href="bk01.html" title="Antelope Users Guide, Version 3.5.1"><link rel="prev" href="bk01ch11s02.html" title="API for jEdit Plugin Developers"><link rel="next" href="bk01ch13.html" title="Chapter13.Support"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter12.Frequently Asked Questions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk01ch11s02.html">Prev</a></td><th width="60%" align="center">Antelope Users Guide, Version 3.5.1</th><td width="20%" align="right"><a accesskey="n" href="bk01ch13.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="faq"></a>Chapter12.Frequently Asked Questions</h2></div></div></div>
<STYLE TYPE="text/css"> <!-- @import url(./style.css); --> </STYLE>
<p>
</p><div class="itemizedlist"><ul type="disc"><li><p>
<span class="bold"><strong>When I try to use the &lt;javac&gt; task, I keep getting a "no compiler found" error, but I have JAVA_HOME set correctly. How can I fix this?</strong></span>
</p><p>
Check two things: (1) make sure JAVA_HOME is really set correctly. Windows JDK installations by default set JAVA_HOME to point to the jre directory under your JDK installation. This is fine for running Java programs, but not for compiling. Set JAVA_HOME up one directory to point to the root of your JDK installation, not the jre directory. (2) make sure JAVA_HOME/bin is in your PATH. This is the directory that contains javac.
</p><p>
Here are some example settings from my Windows 2000 computer:
</p><p>
</p><pre class="programlisting">
JAVA_HOME = c:\j2sdk1.4.1_02
PATH = (path to windows,etc);c:\j2sdk1.4.1_02\bin;
</pre><p>
</p></li><li><p>
<span class="bold"><strong>I'd like to assign a key to a target button when running Antelope as a jEdit plugin. Is there anyway I can do this?</strong></span>
</p><p>
Mark Pollard and I worked out this solution:
</p><p>
In jEdit, open a new buffer and paste this in:
</p><p>
</p><pre class="programlisting">
jEdit.saveAllBuffers(view, false);
VFSManager.waitForRequests();
ise.antelope.plugin.AntelopePlugin plugin =
jEdit.getPlugin("ise.antelope.plugin.AntelopePlugin");
plugin.executeTarget(view, plugin.getBuildFile(view), "compile");
</pre><p>
</p><p>
Replace 'compile' with the name of the target you want to run. Save it in your ${user.home}/.jedit/macros directory (on my Windows machine, this is c:\Documents and Settings\danson\.jedit\macros, on my Linux box, it's /home/danson/.jedit/macros). Name it whatever you want, but be sure to give it a .bsh extention.
</p><p>
Depending on your jEdit version, it will either be automatically loaded or use the 'Macros' menu, then 'Rescan macros' item. Then under the 'Utilities' menu -&gt; 'Global Options' -&gt; 'Shortcuts', pick 'Macros' from the drop down box on the right, and assign a key to the macro you just saved.
</p><p>
If you name your targets consistently across your build files, this will work well for the targets that you run a lot, like 'compile' and 'test'.
</p></li><li><p>
<span class="bold"><strong>I get out of memory errors when trying to run my build file in Antelope. How can I avoid this problem?</strong></span>
</p><p>
If you are starting Antelope with the run.xml file, edit this file and adjust this line:
</p><p>
</p><pre class="programlisting">
&lt;java classname="ise.antelope.app.Antelope" fork="true"&gt;
</pre><p>
</p><p>
to look like this:
</p><p>
</p><pre class="programlisting">
&lt;java classname="ise.antelope.app.Antelope" fork="true" maxmemory="128m"&gt;
</pre><p>
</p><p>
Adjust the maxmemory attribute as needed for your build.
</p><p>
If you are starting Antelope from command-line java, add the -Xmx parameter to the command line like this:
</p><p>
</p><pre class="programlisting">
java -Xmx128m -jar AntelopeApp_3.5.1.jar
</pre><p>
</p></li><li><p>
<span class="bold"><strong>All the buttons disappeared from Antelope. How do I get them back?</strong></span>
</p><p>
This means that you have an error in your build file and Antelope does not recognize it as valid xml. Usually the the output window will give some indication of the problem. Correct the build file and save it, and the buttons will reappear. (See the next question also.)
</p></li><li><p>
<span class="bold"><strong>My build file uses external entities to include standard targets and properties. When I try to open this build file, all the buttons disappear. How do I get them back?</strong></span>
</p><p>
Antelope version 2.53 and earlier did not support external entities. Upgrade to a version later than 2.53. Also, be sure your external entities are declared correctly. This example is from the Ant FAQ:
</p><pre class="programlisting">

&lt;?xml version="1.0"?&gt;

&lt;!DOCTYPE project [
    &lt;!ENTITY common SYSTEM "file:./common.xml"&gt;
]&gt;

&lt;project name="test" default="test" basedir="."&gt;

  &lt;target name="setup"&gt;
    ...
  &lt;/target&gt;

  &amp;common;

  ...

&lt;/project&gt;

</pre><p>

</p></li></ul></div><p>
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk01ch11s02.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="bk01.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="bk01ch13.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">API for jEdit Plugin Developers</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">Chapter13.Support</td></tr></table></div></body></html>