Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java telnet conexion

 
jhon masco
Ranch Hand
Posts: 98
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Pie
Posts: 1166
17
Java Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds to me like "Please choose(1-5):" is not being sent by the server.
 
jhon masco
Ranch Hand
Posts: 98
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Pie
Posts: 1166
17
Java Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 98
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Pie
Posts: 1166
17
Java Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 98
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic