Total members 11893 |It is currently Tue Nov 05, 2024 10:26 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





I want to Execute System Commands like dos commands within my program in jave
like ShellExecute function in C++




Author:
Proficient
User avatar Posts: 280
Have thanks: 1 time

Every Java application has a single instance of class
java.lang.Runtime that allows the application to interface with
the environment in which the application is running. The current
runtime can be obtained from the getRuntime method. An application
cannot create its own instance of this class. For executing
windows apps use

Runtime.getRuntime().exec( "cmd.exe /c start
NOTEPAD.EXE"); //open notepad

_________________
Please recommend my post if you found it helpful


Author:
Proficient
User avatar Posts: 228
Have thanks: 0 time
Post new topic Reply to topic  [ 2 posts ] 

  Related Posts  to : Execute System Commands
 execute if else simultaneously     -  
 @NamedNativeQuery:SQLGrammarException could not execute quer     -  
 calculating time required to execute function     -  
 FTP commands     -  
 SQL AND OR in WHERE query Commands     -  
 DELETE Commands     -  
 jar files commands     -  
 Graphics commands list in C++     -  
 Own an antivirus system in C#     -  
 The operating system using PHP     -  



cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com