I’ve been using jEdit for decades as it provides a nice text editor with similar feature set as something I used at Raytheon called SlickEdit:
- easily records a macro of all actions in the editor
- easily playback the recorded macro
- save the macro and map to keyboard shortcut
- vertical selection
But lately some of my favorite plugins have stop working due to an old plugin that hasn’t been recompiled. So I’ll try to document the process of checking out the jEdit code to recompile it from scratch and recompile the plugins I depend on.
If I have time, I might make a Docker image to do this so it’s easily repeatable for others too.
Getting the jEdit code
To checkout the jEdit code do:
1 2 3 |
svn co http://svn.code.sf.net/p/jedit/svn/jEdit/trunk jedit_ws # ... Checked out revision 24599 |
Building jEdit
Now that we have the latest trunk code do:
1 2 3 4 5 6 7 8 9 10 |
# install the ant builder tool if necessary sudo apt-get install ant cd jedit_ws ant # ... BUILD FAILED /home/nhilton/development/jedit/jedit-trunk/build.xml:268: 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. It is currently set to "/usr/lib/jvm/java-8-openjdk-amd64/jre" |
Oops, I guess I need a java compiler. I tried to install openjdk-9-jdk but got an error. Stackoverflow suggested the command below.
1 2 3 4 5 6 7 8 9 10 11 12 |
udo apt-get -o Dpkg::Options::="--force-overwrite" install openjdk-9-jdk #... ant Buildfile: /home/nhilton/development/jedit/jedit-trunk/build.xml init: [echo] Buildfile for jedit (/home/nhilton/development/jedit/jedit-trunk/build.xml) check-ivy: download-ivy: init-ivy: BUILD FAILED /home/nhilton/development/jedit/jedit-trunk/build.xml:111: Unable to load a script engine manager (org.apache.bsf.BSFManager or javax.script.ScriptEngineManager) |
This problem turned out to be a bug in apache ant 1.9.6.
Upgrading Apache Ant on Ubuntu 16.04
I couldn’t find an existing .deb package so I installed the binary from ant.apache.org. I used the following recipe:
1 2 3 4 5 6 7 8 9 10 11 12 |
# download wget http://www-us.apache.org/dist//ant/binaries/apache-ant-1.10.1-bin.tar.gz # untar into /usr/local sudo tar xf apache-ant-1.10.1-bin.tar.gz -C /usr/local # soft link sudo ln -s /usr/local/apache-ant-1.10.1 /usr/local/ant # export these in your env export PATH=/usr/local/ant/bin:$PATH export ANT_HOME=/usr/local/ant |
Now jedit builds!
1 2 3 4 5 6 7 |
ant # ... build: [jar] Building jar: /home/nhilton/development/jedit/jedit-trunk/build/jedit.jar BUILD SUCCESSFUL Total time: 15 seconds |
One Response to Building jEdit from scratch