CommandBox won't start in Windows if Binary is on different drive than home directory. For instance, if your home directory is in your C: drive and you place box.exe in your D: drive, the following error occurs:
Page /Users/userName/.CommandBox/cfml/system/Bootstrap.cfm [D:\Users\userName\.CommandBox\cfml\system\Bootstrap.cfm] not found
It appears that CommandBox is looking for the home directory on the same drive that the exe is located.
The logic that determines the home path appears to be here on lines 69 through 83:
I'm not sure which switch in the "if" statements is being hit. Debugging that on Windows will probably get us closer.
No, I hadn't seen it. Well, since the uri variable is made by concatenating to the cli_home variable there's really no difference. Why write your own regular expression though? Java already gives you a method to extract the drive from a path via the getRoot() method of the Path class. See my second code snippet in my last comment.
The difference is that the URI might be a file to run, vs. the shell. (important re: file association stuff I mentioned.)
It probably wouldn't hurt to set up a VM with some flavor of linux (maybe a couple, Fedora & Debian at least) so you can test these things out yourself, and avoid some of the "helicopter pilot" effect (fixing one thing and breaking another). I generally test on at least Windows and Linux before I push something, and it's amazing how often something that works fine /here/, doesn't work /there/, as it were.
As for getting the path root, I use a simple regex because the testing I did using Path.getRoot() was not consistent across Windows and Linux, I like how the test just uses strings vs. files, and using files requires quite a bit more overhead (IO exceptions, wonkyness in getCannonicalFile, etc.), but I'm not married to it... feel free to give it a go yourself-- there is a junit4 test you can use to verify that it's working right. Or rather, passing the tests at least.
I bumped the Railo CLI version and the JRE version dependencies in both build-auto and build-local, which should fix this.
not sure why not closing
trying to see why it does not close