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

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -