Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

how to use java to execute IE7 in Window 2003?

Thread view: 
Nick - 07 Jul 2006 04:38 GMT
how to execute IE7?
thanks!
IchBin - 07 Jul 2006 04:43 GMT
> how to execute IE7?
> thanks!

Sorry, you need to explain a lot more...

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA              http://weconsultants.phpnet.us
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor,  Regular Guy (1952-)
Nick - 07 Jul 2006 08:05 GMT
when i type "iexplore.exe" in "start"--> "Execute"--> "iexplore.exe"
then  press ENTER
The IE will appear,but when i execute the following code in Java , i
can't execute the IE, WHY?
and what is the meaning of "p.waitFor();"
thanks!

  try{

          Runtime rt = Runtime.getRuntime();
Process p = rt.exec("iexplore.exe ");
p.waitFor();

      }catch(Exception ex){

      }

chBin wrote:
>> how to execute IE7?
>> thanks!
[quoted text clipped - 7 lines]
> 'If there is one, Knowledge is the "Fountain of Youth"'
> -William E. Taylor,  Regular Guy (1952-)
Andrew T. - 07 Jul 2006 10:16 GMT
> when i type "iexplore.exe" in "start"--> "Execute"--> "iexplore.exe"
> then  press ENTER
> The IE will appear,but when i execute the following code in Java , i
> can't execute the IE, WHY?

Note 'The IE' might end up being 'The FireFox', 'The Safari',
'The Lynx'...

BrowserLauncher2 finds and opens the default browser on
a number of platforms.  Maybe you should look at how they
do it (BL2 is open source).

Andrew T.
Thomas Fritsch - 07 Jul 2006 10:43 GMT
> when i type "iexplore.exe" in "start"--> "Execute"--> "iexplore.exe"
> then  press ENTER
> The IE will appear,but when i execute the following code in Java , i
> can't execute the IE, WHY?
> and what is the meaning of "p.waitFor();"
Did you read the API doc?
  http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Process.html
  http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html

> thanks!
>
>   try{
>
>           Runtime rt = Runtime.getRuntime();
> Process p = rt.exec("iexplore.exe ");
Omit the trailing blank:
  Process p = rt.exec("iexplore.exe");

> p.waitFor();
>
>       }catch(Exception ex){
>
>       }

Signature

Thomas

lordy - 07 Jul 2006 21:52 GMT
> when i type "iexplore.exe" in "start"--> "Execute"--> "iexplore.exe"
> then  press ENTER
[quoted text clipped - 10 lines]
>
>        }catch(Exception ex){

If you dont put anything here you will not see your errors. Any time you
thought you saved by not typing anything here is wasted several times
over by not displaying /logging errors.

>        }

Lordy


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.