Click here to Skip to main content
15,921,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I wanted to write a standalone java program,which can actually remotely get connected to the machine and has to execute certain commands,(say system commands)or install soem services...I am a newbie...any help would be greatly appreciated and or any insight to it would help me a lot...thanks in advance..
Posted
Updated 7-Sep-11 23:28pm
v3
Comments
Member 8221364 9-Sep-11 1:55am    
Okay...let me rephrase my question...say you have 2 machines(in virtual private network)..you login to one machine say x..where u write a stand alone java program ,which has to get remotely connected to system y..(where it is password protected,and you also know the credentials)and there you have to run any file.exe...I did some googling work,where i found psexec tool:it remotely gets connected to the system x and gives the output in system y.
psexec [\\computer[,computer2[,...] | @file][-u user [-p psswd]][-n s][-l][-s|-e][-x][-i [session]][-c [-f|-v]][-w directory][-d][-<priority>][-a n,n,... ] cmd [arguments]
say for example: psexec \\marklap ipconfig /all ,will list all the ips on the system "marklap" in the console of local system..
Please help me out with this...

1 solution

No, you can't. Java applications run under JVM, so you cannot just connect to someone's PC and execute certain commands. But you can make an application that receive connection and execute some command.
Please tell us what you are trying to achieve, so that we can give the right suggestion.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900