Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java run cmd command

fun excCommand(cmd: String) {
  val rt = Runtime.getRuntime()
  try {
	 rt.exec(arrayOf("cmd.exe", "/c", cmd))
  } catch (e: IOException) {
	 // TODO Auto-generated catch block
	 e.printStackTrace()
  }
}
Source by refactorfirst.com #
 
PREVIOUS NEXT
Tagged: #java #run #cmd #command
ADD COMMENT
Topic
Name
8+2 =