Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
| Search | Today's Posts | Mark Forums Read
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 29th, 2006, 12:09 PM
Authorized User
Points: 63, Level: 1
Points: 63, Level: 1 Points: 63, Level: 1 Points: 63, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2006
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dos command from Java application

I need help to know how an external command say Dos Command can be executed from a java application menu.
 
Old September 30th, 2006, 08:48 PM
Friend of Wrox
Points: 1,515, Level: 15
Points: 1,515, Level: 15 Points: 1,515, Level: 15 Points: 1,515, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2003
Location: Oxford, , United Kingdom.
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts
Default

hmm...

Well its probably a bad idea to do this - it'll break your app on every platform except windows. You have been warned ;)

You'll need to use the exec method of the Runtime class:

http://java.sun.com/j2se/1.5.0/docs/...g/Runtime.html

--
Don't Stand on your head - you'll get footprints in your hair
                                           http://charlieharvey.org.uk
                                              http://charlieharvey.com
 
Old October 1st, 2006, 07:30 AM
Authorized User
Points: 63, Level: 1
Points: 63, Level: 1 Points: 63, Level: 1 Points: 63, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2006
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks CIDERPUNX





Similar Threads
Thread Thread Starter Forum Replies Last Post
Dos command eortiz1 BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 0 May 11th, 2006 03:38 PM
passing a DOS command kanoorani Beginning VB 6 3 April 27th, 2006 02:19 AM
BCP command from .Net application babakwx SQL Server 2000 1 April 10th, 2006 03:50 PM
Running DOS Command using VB vmaruv VB How-To 3 February 8th, 2005 05:32 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.