Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
    Bookmark Topic Watch Topic
  • New Topic

Firing statements into Command prompt.  RSS feed

 
Gautam Dembla
Greenhorn
Posts: 9
  • Likes 1
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,
Wanted to know if there was a way i could fire a statement into command prompt and display the results on a label((eg. c:\>ping 172.16.2.214)
and display the results of the ping response on a label(which is refreshed every 50 milliseconds)).Displaying the results can be done by capturing the response in a .txt file and maybe using a threaded IO operation and readind the response onto a label.
Purpose of me doing this is, i want to fire a logical backup of the database from the front-end, similarly restoration of the database from the front-end..
Like incase of VB 6.0, I could give a Shell command and the statement would be executed in the command prompt.
Thanx All..
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
I'm not sure this has anything to do with JSP.
There is no concept of a label in JSP or Servlets.
There is also no concept of a command prompt (other than the address window of the browser).

Is this something you want to do from the web?
 
Shailesh Chandra
Ranch Hand
Posts: 1084
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Report post to moderator
this is cross post of this thread.
 
Gautam Dembla
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Report post to moderator
Ya you are rite, there is nothing for the command prompt to do in JSP/Servlet. So i believe i necessarily need to buildup a server application to fire my statements into the command prompt, i.e that would be in swing/awt. Any clues how i would go abt wit that ?? wot would the code go like ??
Thanx for the help anyways.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!