Textual (command line based) Java IDE

Perhaps the title of the question may seem strange to you, but I will try to explain.

I am looking for an alternative to a desktop eclipse, ideally I need to edit the sources directly on my linux dev server. On dev server, I don't have xwindows command line. Therefore, I would like to connect to the server using Putty, develop, build, run, commit changes to the version control system.

From a text editor I will need:

  • syntax highlighting
  • auto collection (at least basic)
  • files with quick project navigation
  • basic refactoring: change class name? move the class to another package, signature method signature
  • start assembly without having to leave the editor window
  • run svc / git commands without leaving the editor window.

At first glance, emancs seems to be what I need, but I'm not sure.

Thanks.

+4
source share
4 answers

I think you come up, that’s not good. Developing directly on your development server is not a good practice. But this is not a question ...

Personally, my favorite text editor for programming is emacs. I am also a Java developer. I am using Eclim. According to the Eclim Website :

The main goal of eclim is to incorporate Eclipse functionality into the Vim editor. The original goal was to provide java Eclipses functionality in vim, but support was added for various other languages ​​(c / C ++, php, python, ruby, css, html, xml, etc.) And a few more plans.

As I said, I mainly use Emacs. So, I am using emacs-eclim (the Vim plugin is very cool and advanced):

Eclim is an Eclipse plugin that provides Eclipse features through a server interface. When this server is running, the eclim command-line utility can be used to send requests to this server.

Emacs-eclim uses the eclim server to integrate eclipse with emacs. This project wants to bring some of the invaluable features from eclipse to emacs.

If you use Emacs, you can also use JDEE mode. Personally, I do not like this mode: too complicated, not sufficiently supported.

+9
source

Sandro's answer is good for a true command line tool. On unix, emacs and vim are truly the only games in town when it comes to complex command line editors, so a good Java mode for one of them is what you want.

However, I want to note that even if the server does not have an X server, you can still run graphical programs on it - they just need to connect to the X server on another computer, such as your desktop. It sounds strange, but in fact this is the meaning of X-windows: it was originally designed so that people could run programs on powerful computers with a common time and access them from cheap, dumb graphic terminals (this was in the early 80s, when people thought it was a good idea).

Nowadays, the easiest way to do this is to use SSH to connect to a remote computer, telling it to enable X11 forwarding. With OpenSSH command line SSH, it's as simple as adding the -X flag; I'm not sure how you do it with PuTTY, but I'm sure it is possible. Once you are logged in with X11 forwarding enabled, you can simply start the X clients (like Eclipse or IDEA) and they will connect to your local X server.

Oh, you need a local X server. On Windows, you can install Xming

All this requires a bit of work (although not a lot!), So if you just want to hack, all my features come with Eclim. But if you plan to do a lot of remote development, and you don't have much attachment to curses interfaces, this might be the most convenient route.

+3
source

Read a little about Tramp in Emacs. This allows you to run Emacs locally, but edit remote files as if they were local using any of a variety of network protocols (but usually ssh). Shell commands initiated from the buffer editing the remote file will also be executed on the remote server.

This is the opposite of what you requested, and more useful when you do not want to configure Emacs and your user preferences on another machine (or cannot do this), but it is worth knowing about. If your local computer is running Windows and you are using putty, you will need to use the plink method in Tramp.

I believe vim also has similar functionality.

Or, if you can mount the file system of a remote server using sshfs, you will achieve a similar end result (a local editor that manages deleted files) and potentially open up your capabilities to use more familiar editors to do this job.

+1
source

emacs and vim can do what you want. However, if you are no longer familiar with these tools, you should be aware that using them has nothing to do with the graphical interface. I suggest you make it so that you can edit the source code from your PC, which changes directly on your Linux server. There are several ways to do this.

I assume that you do not have xwindows because this server is very limited?

0
source

Source: https://habr.com/ru/post/912754/


All Articles