0

I have a eclipse on windows 7 system and I am trying some code on it.

But as my database is on server that is not my local systems so how can I connect eclipse to remote server so that I can write code on local and run on server.

Is it possible then please let me know and that server to which I want to connect that is Linux server.

Polynomial
  • 27,674
  • 12
  • 80
  • 107
vishal_g
  • 3,871
  • 4
  • 21
  • 34

1 Answers1

1

Do you have to run your program remotely just because your database resides on the other server? Most databases allow connecting over TCP/IP.

Otherwise my suggestion is to add you public ssh key on the server, and then create a script which copies your class files and then executes your java program on your server, such as:

scp -r classfolder remoteuser@remotesystem:folderpath
ssh remoteuser@remotesystem java -cp folderpath the.created.Program

The public key removes the need for you to enter your password for each command.

Roger Lindsjö
  • 11,330
  • 1
  • 42
  • 53
  • I din't get you what you are saying....I am using php eclipse on local window 7 machine...i want whatever programme i write into eclipse and when i run this program it shud run on server instead of local.....let me know if is there any conguration regarding this in eclipse – vishal_g Nov 22 '11 at 10:05
  • I thought you wanted to run a standalone java application. For your needs it is probably enough with FTP support for Eclipse. Read the following two links: http://stackoverflow.com/questions/6311717/developing-php-with-eclipse-on-a-remote-server-ftp-on-windows and http://stackoverflow.com/questions/95800/how-do-i-add-ftp-support-to-eclipse – Roger Lindsjö Nov 22 '11 at 10:39
  • NO I am running php programm on eclipse but instead of running programm locally , i want to run programm on server..is there any way to run programm on server from local eclipse – vishal_g Nov 25 '11 at 05:20
  • The links I provided in the comment shows plugins for eclipse that automatically (by ftp) copies the files you edit locally onto a remote server for testing. – Roger Lindsjö Nov 25 '11 at 08:11