{"id":250,"date":"2017-02-07T04:00:25","date_gmt":"2017-02-07T04:00:25","guid":{"rendered":"http:\/\/weegreenblobbie.com\/?p=250"},"modified":"2017-02-07T04:07:42","modified_gmt":"2017-02-07T04:07:42","slug":"building-jedit-from-scratch","status":"publish","type":"post","link":"https:\/\/weegreenblobbie.com\/?p=250","title":{"rendered":"Building jEdit from scratch"},"content":{"rendered":"<p>I&#8217;ve been using <a href=\"https:\/\/jedit.org\">jEdit<\/a> for decades as it provides a nice text editor with similar feature set as something I used at Raytheon called <a href=\"https:\/\/en.wikipedia.org\/wiki\/SlickEdit\">SlickEdit<\/a>:<\/p>\n<ul>\n<li>easily records a macro of all actions in the editor<\/li>\n<li>easily playback the recorded macro<\/li>\n<li>save the macro and map to keyboard shortcut<\/li>\n<li>vertical selection<\/li>\n<\/ul>\n<p>But lately some of my favorite plugins have stop working due to an old plugin that hasn&#8217;t been recompiled. \u00a0So I&#8217;ll try to document the process of checking out the jEdit code to recompile it from scratch and recompile the plugins I depend on.<\/p>\n<p>If I have time, I might make a Docker image to do this so it&#8217;s easily repeatable for others too.<\/p>\n<h2>Getting the jEdit code<\/h2>\n<p>To\u00a0checkout the jEdit code do:<\/p>\n<pre class=\"lang:sh decode:true\">svn co http:\/\/svn.code.sf.net\/p\/jedit\/svn\/jEdit\/trunk jedit_ws\r\n# ...\r\nChecked out revision 24599<\/pre>\n<h3>Building jEdit<\/h3>\n<p>Now that we have the latest trunk code do:<\/p>\n<pre class=\"lang:sh decode:true\"># install the ant builder tool if necessary\r\nsudo apt-get install ant\r\ncd jedit_ws\r\nant\r\n# ...\r\nBUILD FAILED\r\n\/home\/nhilton\/development\/jedit\/jedit-trunk\/build.xml:268: Unable to find a javac compiler;\r\ncom.sun.tools.javac.Main is not on the classpath.\r\nPerhaps JAVA_HOME does not point to the JDK.\r\nIt is currently set to \"\/usr\/lib\/jvm\/java-8-openjdk-amd64\/jre\"<\/pre>\n<p>Oops, I guess I need a java compiler. \u00a0I tried to install openjdk-9-jdk but got an error. \u00a0<a href=\"http:\/\/askubuntu.com\/a\/772485\/300784\">Stackoverflow<\/a> suggested the command below.<\/p>\n<pre class=\"lang:sh decode:true\">udo apt-get -o Dpkg::Options::=\"--force-overwrite\" install openjdk-9-jdk\r\n#...\r\nant\r\nBuildfile: \/home\/nhilton\/development\/jedit\/jedit-trunk\/build.xml\r\ninit:\r\n [echo] Buildfile for jedit (\/home\/nhilton\/development\/jedit\/jedit-trunk\/build.xml)\r\ncheck-ivy:\r\ndownload-ivy:\r\ninit-ivy:\r\nBUILD FAILED\r\n\/home\/nhilton\/development\/jedit\/jedit-trunk\/build.xml:111: Unable to load a script\r\nengine manager (org.apache.bsf.BSFManager or javax.script.ScriptEngineManager)<\/pre>\n<p>This problem turned out to be a <a href=\"https:\/\/bz.apache.org\/bugzilla\/show_bug.cgi?id=58271\">bug<\/a> in apache ant 1.9.6.<\/p>\n<h2>Upgrading Apache Ant on Ubuntu 16.04<\/h2>\n<p>I couldn&#8217;t find an existing .deb package so I installed the binary from <a href=\"https:\/\/ant.apache.org\/bindownload.cgi\">ant.apache.org<\/a>. I used the following recipe:<\/p>\n<pre class=\"lang:sh decode:true \"># download\r\nwget http:\/\/www-us.apache.org\/dist\/\/ant\/binaries\/apache-ant-1.10.1-bin.tar.gz\r\n\r\n# untar into \/usr\/local\r\nsudo tar xf apache-ant-1.10.1-bin.tar.gz -C \/usr\/local\r\n\r\n# soft link\r\nsudo ln -s \/usr\/local\/apache-ant-1.10.1 \/usr\/local\/ant\r\n\r\n# export these in your env\r\nexport PATH=\/usr\/local\/ant\/bin:$PATH\r\nexport ANT_HOME=\/usr\/local\/ant\r\n<\/pre>\n<p>Now jedit builds!<\/p>\n<pre class=\"lang:sh decode:true\">ant\r\n# ...\r\nbuild:\r\n      [jar] Building jar: \/home\/nhilton\/development\/jedit\/jedit-trunk\/build\/jedit.jar\r\n\r\nBUILD SUCCESSFUL\r\nTotal time: 15 seconds\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;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 &hellip; <a href=\"https:\/\/weegreenblobbie.com\/?p=250\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-250","post","type-post","status-publish","format-standard","hentry","category-computing"],"_links":{"self":[{"href":"https:\/\/weegreenblobbie.com\/index.php?rest_route=\/wp\/v2\/posts\/250","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/weegreenblobbie.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/weegreenblobbie.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/weegreenblobbie.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/weegreenblobbie.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=250"}],"version-history":[{"count":12,"href":"https:\/\/weegreenblobbie.com\/index.php?rest_route=\/wp\/v2\/posts\/250\/revisions"}],"predecessor-version":[{"id":262,"href":"https:\/\/weegreenblobbie.com\/index.php?rest_route=\/wp\/v2\/posts\/250\/revisions\/262"}],"wp:attachment":[{"href":"https:\/\/weegreenblobbie.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/weegreenblobbie.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=250"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/weegreenblobbie.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}