diff --git a/pycromanager/test/conftest.py b/pycromanager/test/conftest.py index 1b464242..f904cb8e 100644 --- a/pycromanager/test/conftest.py +++ b/pycromanager/test/conftest.py @@ -183,9 +183,9 @@ def launch_mm_headless(install_mm): config_file = os.path.join(mm_install_dir, 'MMConfig_demo.cfg') print('Launching Micro-manager in headless mode.') - # MM doesn't ship with Java on Mac so allow it to be defined here + # MM doesn't ship with Java on Mac so allow it to be defined here if using mac os java_loc = None - if "JAVA" in os.environ: + if "JAVA" in os.environ and sys.platform == "darwin": java_loc = os.environ["JAVA"] start_headless(mm_install_dir, config_file, java_loc=java_loc, debug=True)