Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

java telnet conexion

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
BWA HA HA HA HA HA HA! Tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic