Compatibility problem with Joomla 3.8.7 and Civicrm 5.0.1 that affects Cron
I think you are still likely to run into problems on Windows as Aidan mentioned but to give yourself the best chance:


use CiviCRM 5.1.0, which has additional changes to resolve cli.php problems on Joomla 3.8
use cli.php not cron.php. cron.php still doesn't work in some environments


My recollection of PHP and Apache on Windows is that paths with / work fine so you don't need to replace with \ if that's what you meant when you said you changed civicrm_root slashes.

As you saw in the initial error, the path C:\Apache24\htdocs\joomla\administrator\components\com_civicrm\civicrm\administrator\includes\defines.php is incorrect. It should be looking in C:\Apache24\htdocs\joomla\administrator\includes\defines.php.

In CRM\Utils\System\Joomla.php, look in getBasePath(), around line 532, for this line:

$joomlaPath = explode('/administrator', $civicrm_root);


My guess is that the forward slash is not being matched in the Windows path so try changing it to:

$joomlaPath = explode(DIRECTORY_SEPARATOR . 'administrator', $civicrm_root);




UPDATE 22 August 2018: The above change to getBasePath() will be in CiviCRM 5.6