From what I understand you wan't to open a console at the given folder you're at? On windows you can hold Shift and right click inside a Windows folder, that will give you more options. For example Windows powershell, or in my case when having a WSL (Linux sub system) I also have the option to open a Ubuntu 18.04 LTS terminal at the given folder.
If this isn't what you wanted, than that's my bad. But this is a need trick anyways.
And most applications like Visual Studio Code/Intellij always open a terminal at the root folder.
This is a neat trick, but I was looking for a bit of Java code to open the system's local console. Maybe something around the lines of:
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.