This post fromMiniTooltells you the reasons for the annoying issue.
Besides, you’ve got the option to find some feasible methods to fix it in this post.
There are some main reasons for the error: could not create the Java virtual machine.

Wrong parameters or options call Java.
Java global maximum heap memory is not high enough.
Java executable files and/or applications require administrative permissions.

Now, lets see how to fix the annoying issue.
Also see:What Version of Java Do I Have?
Typesysdm.cpland pressEnterto open theSystem Propertiesscreen.
Step 2: Navigate to theAdvancedtab and click theEnvironment Variables….option.
Step 3: Under theSystem Variablespart, it’s crucial that you clickNew….
Step 4: Set the Variable name to_JAVA_OPTIONSand the Variable value toXmx512Mand clickOKto save the changes.
If not, try the next solution.
Open Java.exe with Admin Rights
Step 1: TypeJavain theSearchbox.
Then right-click it and selectOpen file locationto fire up the Javas folder in File Explorer.
Step 2: Now you might right-nudge the java.exe and select Properties.
Step 3: Select theCompatibilitytab.
Select theRun this program as an administratoroption.
Step 4: Select theApplyoption and clickOKto wrap up the window.
you’re free to follow the instructions below.
Step 1: PressWin+Sto openSearch.
Then search forControl Paneland launch it.
Step 2: InControl Panel, selectView by: Categoryon the upper right corner.
Then clickUninstall a program.
Step 4: When all the Java programs are uninstalled, kickstart your system.
Visit the Java official website to reinstall the Java environment.
Then it’s possible for you to see if could not create the Java virtual machine error is removed.
Also see:A Quick Fix Guide to software Blocked by Java Security Issue