Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

To stop running exe/Communicate with running exe

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Everybody,
I am having a java application,which has two buttons viz "RUN" and "Stop".When I click Run-button it opens a site
say http://www.hotmail.com in IE as I am running IEs exe
with statement
Runtime runtime = Runtime.getRuntime();
runtime.exec("explorer http://www.hotmail.com");
It works fine. But How to solve following problems
1. I want to stop same exe when I click button "Stop".How to do it ?
2. I want complete address which is displayed in IE after it opens the respective site.For Example When I open hotmail site
as shown above,it opens a login page and in IEs' addressbar it displays address
http://lc3.law5.hotmail.passport.com/cgi-bin/login
(If you simply type http://www.hotmail.com, you can see above address in addressbar when it opens a login page)
and I wants to access these address in my java application.
How to do it?
Kindly help me regarding above two problems as early as posible.
Kindly help me as early as posible.
Thanks
Javed
 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai Javed,

To stop ur explorer, try System.exit(0) in the stop button click event.

To read the datas from the explorer try using Process getInputStream() method.
RoshiniSridharan
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

For getting the complete address form the browser try getURL
or something similar in java.net.URL class
all the best
reply if u get the answer

------------------
Sagar Surana
optimist
 
Your mother was a hamster and your father was a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic