protected static String getIdentifier ( final String [ ] command , final String fallback ) { String identifier = fallback ; try { final String [ ] cmdout = CaptureStreamHandler . run ( command ) ; if ( cmdout . length > 0 ) { identifier = cmdout [ 0 ] ; } } catch ( final Throwable ex ) { identifier = fallback + ":" + ex . toString ( ) ; } return identifier ; }
Determines the identification of a command line processor by capture the first line of its output for a specific command .