jEdit Community home jEdit Community Wiki > Main > ProgrammingJavaInJEdit jEdit Community Wiki webs:
Main | Plugins | Know | TWiki | Sandbox
Main . { Whats New | Users | Groups | Changes | Index | Search | Go }

Programming Java in jEdit

jEdit can be seen as a text editor, but is well-suited, and often used, for programming. This topic covers using jEdit to edit, compile, run and debug Java code.

This topic assumes you have installed jEdit (if not, please see Installing jEdit, and read the docs after install). You will also need to have the Java Software Development Kit, or SDK, installed (not just the Java Runtime Environment, JRE). See Installing Java for details on installing the Java SDK.

The Basics

For Java programming jEdit includes, out-of-the-box:

that is on top of the regular editing functions--multiple open files, search-and-replace, useful macros, and so on.

To program in Java, you will at a minimum need a Java Software Development Kit; see above. You can use one from Sun, Apple, IBM, or others. The Java Runtime Environment is fine for running jEdit (which is written in Java), but doesn't supply a compiler or other tools.

This topic refers to a number of plugins used in programming Java code with jEdit. Most of them are not required, outside of a compiler. To install any of these plugins, read the Plugin Information and the Plugins Overview; and visit the Web Home topic and the Java Centric topic. Note that almost all plugins come with some form of documentation available in the jEdit Help window; quality and completeness varies, so you may need to post additional questions to the jEdit discussion focums or the jEdit user's mailing list.

A Note About Plugins

begin blatant personal opinion

jEdit plugins are developed, AFAIK, by programmers who want to share their work and inspiration with others. From the mailing lists, it is clear that people take pride in writing and enhancing the plugins they share. [1]

If you are coming to jEdit for the first time, trying to program Java, you may be frustrated with some of the (mostly older) Java-related plugins. Because plugins are written as a voluntary effort, and people are not (ever?) paid for writing them, you may find some plugins are no longer actively maintained and have some limitations or, unfortunately, bugs.

It is a great idea to post concerns, questions, limitations, and possible bugs to the jEdit user's mailing list. You can also write the plugin maintainer, if they are available. People on the mailing list are very active in answering questions and helping users find workarounds. It always seems to pay to be extremely polite when you find a problem with a plugin. Plugins are written by programmers in their free time--that means, weekends, late nights, holidays--and offered to you at no cost. While it can be frustrating when a plugin is not working the way you expect, it is a community effort to develop and improve them. Politeness and friendliness are welcome on the mailing lists.

If you are a Java programmer with some (medium) experience, please consider sending patches/fixes when you find problems with plugins to the maintainers. If the maintainers are no longer available, contact the developer's mailing list for help. The plugin source code can be downloaded automatically from the Plugin Manager, and you can test enhancements and fixes right on your own machine.

end blatant personal opinion -- Patrick Wright

The Compiler

You have several options for compiling your Java code.

JCompiler compiles one file at a time (the compiler will compile dependent files in most cases). Ant Farm and Ant Helper will load Ant (see Ant Tool) and build files you specify into memory, and run Ant targets through a menu action or keyboard binding (shortcut). The latter two may be preffered, since Ant is more powerful than JCompiler, but the Ant plugins require you to write a build file for Ant. There are some Sample Build Files available.

In any of these cases, errors and warnings during the compile are shown in the Error List plugin.


The Target Directory

The Jikes Compiler

Building JavaDocs

Code Completion

Testing Your Code


Code Checks

Code Formatting

Version Control

Working with Multiple Files, Buffers and Projects

-- Patrick Wright - 05 Nov 2004

Topic ProgrammingJavaInJEdit . { Edit | Attach | Ref-By | Printable | Diffs | r1.4 | > | r1.3 | > | r1.2 | More }
Revision r1.4 - 30 Aug 2017 - 15:52 GMT - TWiki Guest
Parents: Web Home
Copyright © 1999-2011 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding jEdit Community Wiki? Send feedback.
Get jEdit at ! Fast, secure and Free Open Source software downloads