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.

Junlin Yi
  • 109
  • 4
  • 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 00:04
  • So vim or Geany can use keyboard shortcuts (or some other shortcut) to compile and run? – Junlin Yi Dec 17 '15 at 00:04
  • Geany can, and Vim can be configured to do so. – muru Dec 17 '15 at 00: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 00:09
  • @Goddard outdated by what standards? – muru Dec 17 '15 at 00:13
  • I think you just want to argue @muru. If you want to talk to me we can discuss this in #ubuntu-offtopic in irc. I have the same name as on here. – Goddard Dec 17 '15 at 00:15
  • @Goddard No, I'm genuinely curious. The last release of Geany was on [November 15th](http://www.geany.org/Documentation/ReleaseNotes). [The version on Ubuntu](http://packages.ubuntu.com/search?keywords=geany) is as updated as can be expected from a normal package. And we have [chat] here. – muru Dec 17 '15 at 00:16
  • Chatting on AskUbuntu comments is discouraged. Lets try and take this to a chat if you want to talk further as we shouldn't hijack the op's question. – Goddard Dec 17 '15 at 00:17

1 Answers1

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.

Goddard
  • 4,674
  • 2
  • 32
  • 51
  • 1
    Both are mentioned in [the dupe](http://askubuntu.com/questions/167256/what-editor-is-as-good-as-textpad-for-compiling-and-running-java-programs). – 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 00: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 00:05
  • @Goddard I will if they're just replicating answers. – muru Dec 17 '15 at 00:07
  • I know I just said that. – Goddard Dec 17 '15 at 00:08
  • 1
    Nope. You said I will downvote *anyone*. I won't downvote someone who's providing new information. – muru Dec 17 '15 at 00:09
  • Well then bud you should re-read what you posted because my answer is not the same - http://askubuntu.com/questions/167256/what-editor-is-as-good-as-textpad-for-compiling-and-running-java-programs – Goddard Dec 17 '15 at 00:10
  • No, there's nothing new, "bud". – muru Dec 17 '15 at 00:12
  • haha take a chill pill. I just don't see it the same as you. No need to get all upset. – Goddard Dec 17 '15 at 00:12