0

I'm looking for a text editor that can compile and run .java files directly, without having to use javac filename.java and java filename. Something similar would be Textpad for Windows, which uses ctrl+1 to compile and ctrl+2 to run.

I've been using gedit for a while, but I find that Textpad is so much easier. What is a program for Linux (preferably free) that offers this feature?

I also don't want an IDE, just a simple text editor with keyboard shortcuts. I have tried Eclipse and Netbeans and found them too unwieldy for my tastes.

marked as duplicate by muru, Ravan, Pilot6, David Foerster, hg8 Dec 17 '15 at 10:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Since I typically have several terms open anyways, I usually don't use the terminal feature in the vim editor. But you can execute shell commands from within the vim editor itself, as I understand it. I don't use emacs, but I understand it has a fairly slick shell ability itself. Not sure about the java requirement, but I'm looking at it as more of a 'generic' shell command anyway. – tniles Dec 16 '15 at 22:36
  • That still leaves Geany and jEdit. – muru Dec 17 '15 at 0:04
  • So vim or Geany can use keyboard shortcuts (or some other shortcut) to compile and run? – Junlin Yi Dec 17 '15 at 0:04
  • Geany can, and Vim can be configured to do so. – muru Dec 17 '15 at 0:08
  • Geany is pretty outdated, but might work. Vim has a horrible learning curve that makes it a waste of time for most people. – Goddard Dec 17 '15 at 0:09
0

Netbeans works well. You can install it easily by going to the website, or

sudo apt-get install netbeans

You can also use Eclipse by either downloading it from the site, or using the repos.

sudo apt-get install eclipse

They are both open source as well.

  • 1
    Both are mentioned in the dupe. – muru Dec 16 '15 at 23:20
  • That's perfect. – Goddard Dec 16 '15 at 23:21
  • I actually don't want an IDE, I edited my question. Sorry that I forgot to mention that. – Junlin Yi Dec 17 '15 at 0:02
  • You could use Atom, although I don't know if it has any Java compilation plugins. Atom is just as slow as an IDE though. Sublime Text might have a plugin for it, but it is closed source and tracks you. I doubt you will get any more input here. @muru will down vote anyone who answers you. – Goddard Dec 17 '15 at 0:05
  • 1
    Nope. You said I will downvote anyone. I won't downvote someone who's providing new information. – muru Dec 17 '15 at 0:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.