• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

java telnet conexion

 
Ranch Hand
Posts: 98
  • 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
 
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • 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
  • 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
Posts: 1166
17
Netbeans IDE Java Linux
  • 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
  • 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
Posts: 1166
17
Netbeans IDE Java Linux
  • 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
  • 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 like tacos! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic