Hey Charles,
One thing I found in poking around at `FileSystemPreferences` is that encrypted home directories can cause problems for them due to path length limits. Do you know if your home directories on encrypted on the server you're using? I believe it uses the `user.home` Java property as the place to place the `.userPrefs/` folder (maybe under `.java/`), so if the home folder location is the problem, setting that property to a non-encrypted location might fix things.
https://stackoverflow.com/a/13847337/1246011
In either case, to test out whether or not the file system prefs are the issue I made a dummy one that doesn't do anything. It shouldn't matter for what you're doing with BehaviorSpace headlessly. You can download the file here:
https://github.com/LaCuneta/DummyPreferences/blob/main/dummypreferences_2.13-0.0.1.jar, or if you prefer you can clone that repo and build it yourself using `sbt package` to avoid using a binary file from a stranger on the internet on your server :-) (it'll be in `target/scala-2.13/` after packaging).
To use it you'll need to add it to your classpath and then set the `java.util.prefs.PreferencesFactory` Java option. Here is an example of what I ran to use it:
```
java -Xmx1024m -Dfile.encoding=UTF8 -Djava.util.prefs.PreferencesFactory=org.nlogo.DummyPreferencesFactory -cp "/path/to/NetLogo 6.2.0/app/netlogo-6.2.0.jar:/path/to/dummypreferences_2.13-0.0.1.jar" org.nlogo.headless.Main --model ~/WolfSheepPredation.nlogo --experiment energy --spreadsheet ~/WSP-energy.csv
```
To set the classpath I had to use colons to delimit the jars, surround the string in double quotes, and then the full, absolute paths instead of the home shortcut, `~`, as it doesn't work inside the quotes (dunno if you were using that or not).
If that helps, then we at least know the file prefs are the cause, even if we don't exactly know why. It could be the encrypted home drive issue, or possibly something else. In either case, let me know what you find. Thanks.
-Jeremy