public function check()
    {
        if(self::isChecked() === false)
        {
            // Java command must not return an error
            exec(($this->java ?: 'java') . ' -version 2> /dev/null', $output, $return);
            if($return != 0)
            {
                throw new Exception('Java command not found');
            }
            // JAR path must exists
            elseif(file_exists($this->path) === false)
            {
                throw new Exception('Apache Tika app JAR not found');
            }

            self::setChecked(true);
        }
    }
public function check()
    {
        if(self::isChecked() === false)
        {
            // Java command must not return an error
            exec(($this->java ?: 'java') . ' -version 2> /dev/null', $output, $return);
            if($return != 0)
            {
                throw new Exception('Java command not found');
            }
            // JAR path must exists
            elseif(file_exists($this->path) === false)
            {
                throw new Exception('Apache Tika app JAR not found');
            }

            self::setChecked(true);
        }
    }
public function check ( ) { if ( self :: isChecked ( ) === false ) { // Java command must not return an error exec ( ( $ this -> java ? : 'java' ) . ' -version 2> /dev/null' , $ output , $ return ) ; if ( $ return != 0 ) { throw new Exception ( 'Java command not found' ) ; } // JAR path must exists elseif ( file_exists ( $ this -> path ) === false ) { throw new Exception ( 'Apache Tika app JAR not found' ) ; } self :: setChecked ( true ) ; } }
Check Java binary, JAR path or server connection

@return  void
@throws  \Exception
Check Java binary JAR path or server connection