&1", $output, $exitCode);
if($exitCode) {
print "Java is not installed on this server. To run the Convert To Text plugin you'll need at least Java 7.0\n";
exit;
}
$outputFirstLine = @$output[0];
if (preg_match('/"([^"]+)"/', $outputFirstLine, $textArray)) { //get the version number from the quotation marks on the first line.
$versionString = $textArray[1];
list($release,$version,$build) = explode(".", $versionString);
if (!$version) {
print "Java is not installed on this server. To run the Convert To Text plugin you'll need at least Java 7.0\n";
}
elseif ($version <= 6) {
print "YES (Java version ".intval($version).".0) - Version 7.0 or greater must be installed to use the Convert To Text plugin\n";
}
elseif ($version >= 7) {
print "YES (Java version ".intval($version).".0)\n";
}
else{
print "Can't determine\n";
}
}
else {
//Nothing on the first line
print "Java is not installed on this server. To run the Convert To Text plugin you'll need at least Java 7.0\n";
}
// eof