Compile and run Java programs easily within Emacs.
This is the first Emacs package I’ve (partialy) written. It is a simple package originated from James Borden’s javac-mode back in 2012. There are lots of simplifications and modifications that aims to enhance the original functionality.
It is now capable of compiling and running Java programs using one single command java-one-click-run
. The behavior is similar to Eclipse and Intellij, which opens a shell buffer utilizing the package shell-here.
- Clone or download this repository.
- Install shell-here.
- In your
~/.emacs
configuration file, add the following lines:(add-to-list 'load-path "<path-to-java-one-click-run>") ; add java-one-click-run to your load-path (require 'java-one-click-run)
- Bind
java-one-click-run
to your favourite key.
If you prefer use-package
, a sample is provided:
(use-package java-one-click-run
:load-path "~/.emacs.d/site-elisp/java-one-click-run/"
:init (use-package shell-here)
:bind ("<f5>" . java-one-click-run))
I have never written an emacs package before, any suggestions for improvement are very welcomed! :)
The original package was licensed under MIT. Now that I made this package, I decided to relicense it under GPLv3 (MIT is GPL-compatible). Mainly to keep consistency with other emacs packages, and I like free software.