java - Get environment shell -
i'm creating java library backend tomcat web interface. purpose of library take arguments interface , use them execute other commands on system.
i know can use runtime.getruntime().exec()
send command, there way identify shell commands sent to?
i'd use syntax know bash direct stdout
target file, i'm not sure if i'm in bash, bourne, or else unique java runtime.
desired result: shell flexibility. detect when can
runtime.getruntime().exec(mycommand + " >> " + mytargetfile);
and when invalid operator.
edit: formatting
Comments
Post a Comment