I have a Java Socket Programming Server side and Client side. its works on my PC. my server works on the methods like ... my PC OS -Windows NT - i started my java server from my machine. i have another unix machine,use only its ip and port .then i tried to run on javaserver ip,port of unix. i could run this way..
c:\>javaserver ip ,port -- [server runs this ip,port of unix] server starting.... c:\>javaClient ip port -- [client runs on unix ip ,port its messages as follows] [-- here typed unix command and then this time server automatically create a temp ile on usr/tmp directory. eg: cmd_12345.sh and stored all commands from the client.] Enter command :ls Enter command :cal Enter command :N -- flag N means sending commands user wants stop.
[if the client sent the commands stop signal to server eg: i mentioned "N" - means (flag) end of command,(client can send n number of commands to send to server). this time server accept N then start to executing commands one by one from command_12345.sh file and its result stored in to the command_12345.txt file, then after sent the result to the client.] i could run on all the commands on UNix from windows platform.
In the above methods i can't run windows NT commands, AS400 commands and AIX commands.This is my requirements. How to solve this problem on my Programme. Thanks in advance
If I understand you correctly (and I'm not at all sure I do) you've written a program which listens on a socket for strings from a client, saves the strings into a file named command_12345.sh, and runs this as a script. It works correctly on UNIX, but not on Windows NT. Well, the main problem may just be that Windows NT doesn't use shell scripts, it uses batch files named *.bat. Unless the file has a name like this, Windows won't execute it. Otherwise the basic approach is going to be similar. You do realize that this is an incredibly dangerous program, right? Anyone with access to this network will be able to completely take over the machine.