Building jEdit from source

I have recently agreed to take over development of the JSLint plugin for my favourite editor, jEdit.

To start developing I decided to build jEdit and its plugins from source, which wasn’t as easy as I would have expected (thanks to deffbeff for some pointers). A few small changes to the setups for the plugins would make it much easier – at some point I may try to help out there, but for now, here is how I built jEdit and the set of plugins I use regularly:

sudo apt-get install openjdk-6-jdk ant git-core subversion

cd ~/code/public
mkdir jedit
cd jedit

svn co jEdit

cd jEdit; ant; cd ..

mkdir plugins

Now I made a file inside plugins called which looked like this:

install.dir       = ../../jEdit/build/settings/jars
jedit.plugins.dir = ../../jEdit/build/settings/jars
jedit.install.dir = ../../jEdit/build     = ../build-support

And then continued like this:

cd plugins
svn co build-support

svn co ErrorList
svn co CommonControls
svn co InfoViewer
svn co Console
svn co BufferList
svn co FindFile
svn co GnuRegexp
svn co OpenIt
svn co RecentBufferSwitcher
svn co Sessions
svn co WhiteSpace
svn co ScriptEnginePlugin
svn co JavascriptScriptEnginePlugin

git clone git://
git clone git:// jslint

cd ErrorList; ant; cd ..
cd CommonControls; ant; cd ..
cd InfoViewer; ant; cd ..
cd ProjectViewer; ant; cd ..
cd Console; ant; cd ..
cd BufferList; ant; cd ..
cd FindFile; ant; cd ..
cd GnuRegexp; ant; cd ..
cd OpenIt; ant; cd ..
cd RecentBufferSwitcher; ant; cd ..
cd Sessions; ant; cd ..
cd WhiteSpace; ant build; cd ..
cd ScriptEnginePlugin; ant; cd ..
cd JavascriptScriptEnginePlugin; ant; cd ..
cd jslint; ant; cd ..

To find out the dependencies of all plugins and therefore what order to build them, I did this:

find ./ -name "*.props" | xargs grep "depend.*plugin"

Surely something should do this for me automatically?

The problem I haven’t solved yet is that the FTP plugin requires JUnit. I could have copied the junit.jar into the jars dir and I think it would have worked, but I want to do it “properly”…

Finally, I made a .desktop shortcut file in ~/.local/share/applications/jedit.desktop like this:

[Desktop Entry]
GenericName=Programmer's Text Editor
Comment=Edit text files
Exec=java -jar /home/andy/code/public/jedit/jEdit/build/jedit.jar -settings=/home/andy/code/public/jedit/jEdit/build/settings %U

Which enabled me to run the jEdit I had built from my system menu.

Note that I am running jEdit under OpenJDK because Sun/Oracle Java is annoying to get hold of at the moment, and generally somewhat evil. Thanks Oracle for killing Java. jEdit does not work brilliantly with OpenJDK, which is frustrating. Maybe I’ll try to fix it?

3 thoughts on “Building jEdit from source”

  1. I’m curious if anyone who uses jedit from source, ever got jEdit to build from inside either netbeans or eclipse? I can get jEdit to build from the command line directly with ant but it seems that jedit’s project structure and both Netbeans and Eclipse’s features to import a java project from existing sources or using an existing ant build.xml are seriously limited in ways that prevents them from working at all with the jedit sources.

    I asked a question about netbeans+jedit here:

    Netbeans even has a wiki page addressing this very subject, but like all things, it’s out of date and no longer works. (UI changes in Netbeans UI especially around how it works with existing Java projects have rendered Netbeans 7.3 less functional in this area than earlier versions, it seems.)


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.