aspose file tools*
The moose likes Java in General and the fly likes java telnet conexion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "java telnet conexion" Watch "java telnet conexion" New topic
Author

java telnet conexion

jhon masco
Ranch Hand

Joined: May 13, 2010
Posts: 93
Hi everybody
I using apache common net library for telnet conexion. I am doing this example . This work fine for me when i use it in Linux systems but i trying to use in Windows NT and i am having problems.
The main problem i think is with the prompt. in my system the prompt is c:\winnt\profiles\TRAFICO>
i have in my code the next:

It work fine untill the "dir" command! Is to say, he stop when must execute DIR command in other words , it stop when appear the "c:\winnt\profiles\TRAFICO>" prompt.
Can someone tell me why not work??
Any question or extra detail please let me know.

Thanks
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 1044
    
  10

Sounds to me like "Please choose(1-5):" is not being sent by the server.
jhon masco
Ranch Hand

Joined: May 13, 2010
Posts: 93
Richard Tookey wrote:Sounds to me like "Please choose(1-5):" is not being sent by the server.

Hi Richard
Yes, the string "Please choose(1-5):" is working fine and i send option "2" then after that appear the prompt "c:\winnt\profiles\TRAFICO>" .
I had execute these command manually many times and these work fine in the server.
Thanks
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 1044
    
  10

jhon masco wrote:
Richard Tookey wrote:Sounds to me like "Please choose(1-5):" is not being sent by the server.

Hi Richard
Yes, the string "Please choose(1-5):" is working fine and i send option "2" then after that appear the prompt "c:\winnt\profiles\TRAFICO>" .
I had execute these command manually many times and these work fine in the server.
Thanks


And what about the promptComplete message? Does the case matter? If so then you have shown "TRAFICO2" with both upper and lower case. Which is correct?
jhon masco
Ranch Hand

Joined: May 13, 2010
Posts: 93
And what about the promptComplete message? Does the case matter? If so then you have shown "TRAFICO2" with both upper and lower case. Which is correct?

Inmediately after i send "2" then will appear the promptComplete variable (is to say, the prompt "c:\winnt\profiles\TRAFICO>" ). I had tested the word "trafico" with uppercase and lowercase. But nothing happen.
I can see the output in the netbeans console :

The promptComplete variable appear but never send the "dir" command after that. The promtp is waiting for command, but the command never is send.!
I hope you understand me.
thanks
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 1044
    
  10

The only thing I can think of is that it should be


P.S. Having now revealed it maybe you should now change your password!
jhon masco
Ranch Hand

Joined: May 13, 2010
Posts: 93
Richard Tookey wrote:The only thing I can think of is that it should be
P.S. Having now revealed it maybe you should now change your password!


Thanks for the suggestion, but it did not work!
Thank you very much.

P.S. The password is not revealed , i did put "xxxx" for hide the other characters!
 
wood burning stoves
 
subject: java telnet conexion