5

Probably question title might looks strange for you, but I'll try to explain.

I do looking alternative of desktop eclipse, ideally what I need is to edit sources directly on my linux dev-server. On dev server I don't have any xwindows just command line. So I would like to login to server using Putty, develop, build, run, commit changes to source control system.

From text editor I would need:

  • syntax highlight
  • autocomletion (at least basic)
  • quick navigation trough project files
  • basic refactoring: change class name? move class to other package,change method signature
  • run build without need to leave editor window
  • run svc/git commands without need to leave editor window

From the first glance emancs seems to be what I need, but I don't sure.

Thanks.

asked Sep 24, 2011 at 11:13
3
  • possible duplicate of What is the best free IDE for Java programming? Commented Sep 24, 2011 at 11:21
  • No, abovesun wants a command line editor/IDE for Java. Commented Sep 24, 2011 at 11:33
  • Which solution did you settle on? Commented Nov 12, 2015 at 13:17

4 Answers 4

8

I think that you approach is not good. Developing directly on your devel server is not a good practice. But it's not the question...

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

The primary goal of eclim is to bring Eclipse functionality to the Vim editor. The initial goal was to provide Eclipse’s java functionality in vim, but support for various other languages (c/c++, php, python, ruby, css, html, xml, etc.) have been added and several more are planned.

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

Eclim is an Eclipse plugin which exposes Eclipse features through a server interface. When this server is started, the command line utility eclim can be used to issue requests to that 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 the JDEE mode. Personally, I don't like this mode : too complicated, not enough maintained.

answered Sep 24, 2011 at 11:21
Sign up to request clarification or add additional context in comments.

5 Comments

The issue is that I'm working in outsourcing company in Ukraine, our client is in US, because of security policy we have to develop on machine in client network, so I have to use Remote Desktop with all related Europe-USA delays.
so JDEE could be used in TTY mode?
Yes. There's another alternative : malabar-mode. But it works only for Maven based project. I do not like this mode, like JDEE :-)
yep, malabar-mode is something I'm looking now, my projects on 90% maven based
You can test it, I hope that it will be great for you. Don't forget to accept the answer if it's good for you.
3

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

However, i want to point out that even if the server doesn't have an X server, you can still run graphical programs on it - they just have to connect to an X server on another machine, such as your desktop. Sounds weird, but that is actually the whole point of X windows: it was originally developed so that people could run programs on powerful time-shared machines, and access them from cheap, dumb graphical terminals (this was back in the early 80s when people thought that was a good idea).

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

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

All of this takes a bit of work (although not a lot!), so if you just want to do occasional hacking, my all means go with Eclim. But if you are planning on doing a lot of remote development, and you don't have a lot of affection for curses interfaces, this might be the most comfortable route.

answered Sep 24, 2011 at 12:00

1 Comment

Tom, thanks for you advice, but I can't use X's anyway, I do looking exactly for TTY based editor. The complex development with heavy refactoring I'll still perform on windows+eclipse, I do need tty based java ide for more minor actions. So does emacs has Java mode in TTY mode? Thanks.
2

Do some reading about Tramp in Emacs as well. That allows you to run Emacs locally, but edit remote files as if they were local, using any of a variety of network protocols (but typically ssh). Shell commands initiated from a buffer editing a remote file will also execute on the remote server.

That's sort of the opposite of what you were asking for, and more useful when you don't want to have to set up Emacs and your custom configurations on another machine (or can't do so), but it's worth knowing about. If your local machine is running Windows, and you are using putty, you would need to use the plink method in Tramp.

I believe that vim has some similar functionality, also.

Or if you can mount the remote server's filesystem with sshfs, you would achieve a similar end result (local editor manipulating remote files), and potentially open up your options to utilise more familiar editors to do the work.

answered Sep 24, 2011 at 14:53

Comments

0

emacs and vim can do what you want. However unless you are familiar with these tools already, you should know that using them is nothing like using a GUI. I suggest you make it so you can edit source from your PC which are changed directly on your linux server. There are any number of ways you can do this.

I assume you don't have xwindows because this server is very limited??

answered Sep 24, 2011 at 11:22

2 Comments

Server is not so limited, it just don't have any GUI, or application is quite memory consuming beast, we can't spend free RAM on GUI
When you can buy a 24 GB server for £1000, even a 1 TB server for £40K, it must be very memory hungry. If this is only development perhaps you can reduce how much memory you need to make you life easier. Certainly you don't want to have you production system so maxed out in this way.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.