Running into IntegratedWebLogicServer issues for Windows users with spaces

When attempting to start the IntegratedWebLogicServer in Oracle JDeveloper 12.2.1.3, I received the following error:

Error: Could not find or load main class Aboulnaga\AppData\Roaming\JDeveloper\system12.2.1.3.42.170820.0914\DefaultDomain

And here's a screenshot from the IDE:

Analysis

Turns out the issue is that my Microsoft Windows user "Ahmed Aboulnaga" contains a space, which threw off a lot of the directories in many of the scripts.

So I did a recursive search for all *.cmd files under the newly DefaultDomain which contains the string "Ahmed Aboulnaga", and here's what I found:

Here's an example of one of the scripts, and you can see the subfolder/user that is causing the issue in question. Note that this is only applicable to JDeveloper running on Windows-based workstations:

First Attempt (did not work)

I edited each of the *.cmd files identified and qualified them with double quotes as shown:

Normal this takes care of the spaces in other Windows scripts, but JDeveloper threw a new error:

The system cannot find the path specified.

And here's the snippet from the IDE log output:

Clearly it's not finding Java because the path looks wrong, so instead of trying to troubleshoot this further, I opted for an alternate solution.

Second Attempt (worked!)

Windows allows you to reference files and folder names by their long name or their short name for this exact reason. I ran the dir /X command to find the what the short name for this particular folder was:

Now I edited each of the *.cmd for a second time and replaced all references as follows:

Success!

References