Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Ubuntu 12.04. I have uploaded a small java program (Hadoop Word Count) to a linux-server using FileZilla and now have to run that program onto server machine. I know how to connect to server using terminal i.e. ssh -l user-name ip-of-server But don't know how to run program that resides there. Please help me how to run that program from my machine.

share|improve this question

I believe what you need is to connect to the server this way:

ssh user@server -X

With the -X argument the session renders the graphical interface of the program in your client.

share|improve this answer

You need a java compiler to compile your program before you run it to install the compiler, run the command apt-get install javac(assuming you are operating as root). You must have your program saved with a .java extension. We will call it . When all of the above is in place, use the command javac to compile and then java example to run. When you compile, bash not giving you any response is a sign that the compiling succeeded without error. I have given this assuming you have used ssh to login to the server remotely

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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