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 execute the windows command?

Thread view: 
Nick - 09 Jul 2006 02:46 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!
Chris Smith - 09 Jul 2006 04:06 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?

Hmm, I have one guess.  Perhaps it's because there is no "following
code"?  Executing no code generally produces no results. :)

> and what is the meaning of "p.waitFor();"

It "causes the current thread to wait, if necessary, until the process
represented by this Process object has terminated."  Quote is from the
API specification; also known as the API documentation or (less
correctly) Javadocs.  You do have that, right?

Signature

Chris Smith - Lead Software Developer / Technical Trainer
MindIQ Corporation

Rhino - 09 Jul 2006 04: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();"
> thanks!

I found this article very helpful in understanding what you need to do to
execute operating system commands from Java:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps_p.html

--
Rhino


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.