Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

2 Answers 2

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 example.java . When all of the above is in place, use the command javac example.java 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

 
discard

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.