
jsPsych - A JavaScript Library for Creating Behavioral Experiments
Open Source Contribution
I recently contributed to the jsPsych project by addressing a critical Windows 11 compatibility issue that was preventing the platform from working correctly on modern Windows systems. This contribution helps ensure that researchers can seamlessly use jsPsych for their behavioral experiments.
The Problem
The original loader.bat
script in the jsPsych ecosystem relied on WMIC (Windows Management Instrumentation Command-line) to check if Java processes were already running. However, Microsoft deprecated and removed WMIC by default in Windows 11, causing the script to fail and preventing users from running jsPsych-based experiments out-of-the-box.
wmic process where "name like '%%java%%'" get commandline
The Solution
I replaced the deprecated WMIC command with a modern alternative using tasklist
, which is available by default on all Windows systems including Windows 11:
tasklist /nh /fi "imagename eq java.exe" /v
This change ensures that jsPsych functions correctly on Windows 11 without requiring users to manually install WMIC as an optional feature, providing a seamless out-of-the-box experience for researchers conducting behavioral experiments.
Impact & Significance
- Enhanced Compatibility: jsPsych now works seamlessly on Windows 11 systems without additional configuration
- Improved User Experience: Researchers can start using jsPsych immediately after installation
- Future-Proofing: The solution uses modern Windows commands that are more likely to remain available
- Community Benefit: Helps maintain jsPsych as a reliable platform for online psychological and behavioral experiments
This contribution ensures that researchers worldwide can continue using jsPsych for their behavioral experiments on the latest Windows systems, maintaining the accessibility and reliability of this important research tool.