jEdit Community - Resources for users of the jEdit Text Editor
The 9th Circle of Hell: building a jEdit distribution with ant
Submitted by namxat on Wednesday, 4 August, 2004 - 04:47
Hello. I am not new to jEdit, but I am fairly new to ant. I am trying to build the dist target, and am routinely rewarded with a quite verbose, yet uninformative, list of errors.

Now I don't know if I should be superuser when I build this (I assume I should), and I don't know what environment variables ant and/or jEdit's build.xml file expect (the build.xml file is not enlightening to me). None of this is documented anywhere that I could find. I do have my $JAVA_HOME global environment variable set to '/usr/java/j2sdk1.4.2_05', and '$JAVA_HOME/bin' is included in the global $PATH variable.

Upon initial examination of ant's output, it appears as though none of the standard j2sdk classes are being found by ant. Since pretty much EVERY modern distribution of Sun's JDK includes the standard Java class files on the system classpath by default (1.4.2 DEFINITELY does), the only explanation I can think of is some sort of rogue dynamic classloader issue. In any case, I am thoroughly convinced that had Dante's Inferno been written in modern times, dealing with ant and/or dynamic Java classloading would have been listed as one of the punishments for sinners in the 9th Circle of Hell.

But enough venting from me. If anyone can think of any glaring newbie mistake I might be making after examining the following error trace from my pitiful attempt to build a jEdit distribution, I would greatly appreciate the advice:


[root@localhost jEdit]# ant dist
Buildfile: build.xml

init:
[delete] Deleting: /usr/src/jEdit/doc/docbook-wrapper.xsl

compile:
[javac] Compiling 362 source files to /usr/src/jEdit
[javac] /usr/src/jEdit/org/gjt/sp/jedit/textarea/TextAreaPainter.java:54: error: Superinterface `TabExpander' of class `org.gjt.sp.jedit.textarea.TextAreaPainter' not found.
[javac] public class TextAreaPainter extends JComponent implements TabExpander
[javac] ^
[javac] /usr/src/jEdit/org/gjt/sp/jedit/syntax/Chunk.java:305: error: Type `TabExpander' not found in the declaration of the argument `expander' of method `init'.
[javac] public void init(Segment seg, TabExpander expander, float x,
[javac] ^
[javac] /usr/src/jEdit/org/gjt/sp/jedit/syntax/DisplayTokenHandler.java:43: error: Type `TabExpander' not found in the declaration of the argument `expander' of method `init'.
[javac] TabExpander expander, List out,
[javac] ^
[javac] /usr/src/jEdit/org/gjt/sp/jedit/syntax/DisplayTokenHandler.java:156: error: Type `TabExpander' not found in declaration of field `expander'.
[javac] private TabExpander expander;
[javac] ^
[javac] /usr/src/jEdit/org/gjt/sp/jedit/gui/TextAreaDialog.java:89: error: Type `JTextArea' not found in the declaration of the local variable `textArea'.
[javac] JTextArea textArea = new JTextArea(10,80);
[javac] ^
[javac] /usr/src/jEdit/org/gjt/sp/jedit/gui/ViewRegisters.java:119: error: Type `JTextArea' not found in declaration of field `contentTextArea'.
[javac] private JTextArea contentTextArea;
[javac] ^
[javac] /usr/src/jEdit/org/gjt/sp/jedit/gui/AbbrevEditor.java:216: error: Type `JTextArea' not found in the declaration of the return type of method `getBeforeCaretTextArea'.
[javac] public JTextArea getBeforeCaretTextArea()
[javac] ^
[javac] /usr/src/jEdit/org/gjt/sp/jedit/gui/AbbrevEditor.java:222: error: Type `JTextArea' not found in the declaration of the return type of method `getAfterCaretTextArea'.
[javac] public JTextArea getAfterCaretTextArea()
[javac] ^
[javac] /usr/src/jEdit/org/gjt/sp/jedit/gui/AbbrevEditor.java:229: error: Type `JTextArea' not found in declaration of field `beforeCaret'.
[javac] private JTextArea beforeCaret, afterCaret;
[javac] ^
[javac] /usr/src/jEdit/org/gjt/sp/jedit/gui/AbbrevEditor.java:229: error: Type `JTextArea' not found in declaration of field `afterCaret'.
[javac] private JTextArea beforeCaret, afterCaret;
[javac] ^
[javac] /usr/src/jEdit/org/gjt/sp/jedit/gui/PasteFromListDialog.java:124: error: Type `JTextArea' not found in declaration of field `clipText'.
[javac] private JTextArea clipText;
[javac] ^
[javac] /usr/src/jEdit/org/gjt/sp/jedit/pluginmgr/InstallPanel.java:449: error: Superclass `JTextArea' of class `org.gjt.sp.jedit.pluginmgr.InstallPanel$PluginInfoBox' not found.
[javac] class PluginInfoBox extends JTextArea implements ListSelectionListener
[javac] ^
[javac] /usr/src/jEdit/org/gjt/sp/jedit/print/BufferPrintable.java:28: error: Class or interface `javax.swing.text.TabExpander' not found in import.
[javac] import javax.swing.text.TabExpander;
[javac] ^
[javac] /usr/src/jEdit/org/gjt/sp/jedit/print/BufferPrintable.java:375: error: Superinterface `TabExpander' of class `org.gjt.sp.jedit.print.BufferPrintable$PrintTabExpander' not found.
[javac] static class PrintTabExpander implements TabExpander
[javac] ^
[javac] 14 errors

BUILD FAILED
file:/usr/src/jEdit/build.xml:35: Compile failed; see the compiler error output for details.

Total time: 4 seconds
[root@localhost jEdit]#
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
1. you don't need to be root.
by Anonymous on Wed, 04/08/2004 - 19:16
1. you don't need to be root.
2. are you sure you're using Sun's JDK, and not Kaffe, GCJ, etc... or some such?
 
More research, but no answers yet.
by namxat on Wed, 04/08/2004 - 22:10
First off, I tried building as my user account, in my home directory. Same problem. So, I tried this approach:

First, I added the following line to the build.properties file:

build.compiler=javac1.4

This had the exact same result. So I removed it, and added the following line to all the javac ant tasks in the build.xml file:

compiler="javac1.4"

I tried this, and got the following results:

[bash jEdit]$ ant dist
Buildfile: build.xml

init:
[delete] Deleting: /home/jsmith/src/jEdit/doc/docbook-wrapper.xsl

compile:
[javac] Compiling 362 source files to /home/jsmith/src/jEdit

BUILD FAILED
file:/home/jsmith/src/jEdit/build.xml:36: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK

Total time: 0 seconds
[bash jEdit]$


Now, the JAVA_HOME is set to this:

[jsmith@localhost jEdit]$ echo $JAVA_HOME
/usr/java/j2sdk1.4.2_05


And the which command yields the following result:

[jsmith@localhost jEdit]$ which javac
/usr/java/j2sdk1.4.2_05/bin/javac


Any ideas what this could be? Is anybody else having difficulty with the dist target?
User login
Browse archives
« November 2024  
MoTuWeThFrSaSu
 
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
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   101634
Context Free Art (*.cfdg)   0.31   46062
BBEdit scheme   1.0   18601
JBuilder scheme   .001   18502
ColdFusion scheme   1.0   18031
R Edit Mode - extensive version   0.1   17481
Advanced HTML edit mode   1.0   16213
Matlab Edit Mode   1.0   16075
jEdit XP icons   1.0   15236
XP icons for jEdit   1.1   14300