I wanted to offer a couple more clarifications, in case anyone else finds this 2022 thread and sees my 2023 answer (and 2024 follow-up).
One is that I’ve since found you can avoid the need to create the empty jvm.config–if you make a different choice in setting up the “server” in CFBuilder. The other is that if you DO try my approach, it turns out there’s one more detail to note (if you find it still “doesn’t work”).
1a - So first, what we have been discussing here is what one would see in setting up a CFB “server” when its setting (on its first “general settings” page) for the “Application server” field is its default choice of “cf + tomcat bundle”.
THAT is where I was finding that we needed to create an empty jvm.config in the WEB-INF/cfusion/bin of that commandbox server instance, to avoid the “invalid server home” error.
1b - Well, I learned this weekend that you can ALSO change that value to “other”, in which case one does NOT need to create that empty jvm.config file. It “works fine” without it.
That said, do beware that when you right-click on the server (going to the “CF” extension in CFB, and its “Servers” list), there are fewer options when defining the Commandbox server instance using this “other” approach. But it does “work”.
2 - That said, I do have one more clarification about the approach I offered (for when using that default “cf + tomcat bundle” option).
It turns out that if you have created the server definition (before creating that empty jvm.config), CFB requires that you specify the closing slash on the “server home” value, where you name your commandbox instance’s location. If you don’t add the slash, you will find it STILL complains of “invalid server home”–even IF you HAVE now defined the empty jvm.config.
It’s a bit of an edge case, I grant, but I helped someone who hit it, and I confirmed experiencing it also, so I thought it worth mentioning.
3a - As for why one may bother to proceed with this “empty jvm.config” approach, well, there are two reasons to keep it in mind. First is the fact that it’s what’s needed if you do NOT know/think to change that “application server” field from its default of “cf + tomcat bundle”.
But second, note that when you use this approach, you get the same CFB options for controlling that “server” as would for a “normal” CF instance. These options are reflected when you right-click the server in CFB (and some–but not all–are offered as buttons to the right of the server in the list).
These options include one to launch the CF Admin for that CF instance–which of course the Commandbox statustray also offers. The others are to start/stop/restart the instance–which of course the Commandbox status tray also offers. That said, these 3 features do NOT work (within CFB) for a Commandbox instance.
Anyway, the point is that none of those (start/stop/restart/launch admin) appear if you use that new “other” approach I just discussed above.
3b - One may wonder then: why bother with the first approach (and the need to create the “empty jvm.config” approach, and worry about the closing slash)?
Well, I would just wonder: if these four CFB server menu features are lost when configuring the server using this “other” approach, what OTHER CFB features might be lost? I don’t know. I have only started exploring that new approach.
So again I leave all this for others who may find this thread in the future. I would welcome hearing if anyone discerns any other differences in using either of these two approaches.
BTW, for those who care to go exploring, note that it’s totally ok to have 2 different servers defined in CFB (such as these two ways) which both point to the same CF instance.
(And yes, some will complain “this is just one more reason I won’t bother with CFBuilder”. Our discussion here is not for you, then. The question was raised originally by AIS, and it came up again on the ACF forums this weekend, which is where this additional discovery were teased out. Some folks will be interested to try it, such as to try to leverage some of the unique features CFB offers over other vscode cf extensions. None of this is to knock them, of course. They all have their benefits and challenges.)