. Advertisement .
. Advertisement .
We recently downloaded IntelliJ IDEA. However, when we try to execute the main class, we face the Error: Could not create the Java Virtual Machine. Without delay, let’s look for an answer to this issue in our following blog post.
When Does The Error ”Could not create the Java Virtual Machine” Happen?
As you try to install IntelliJ IDEA, the following issue will appear.
Abnormal build process termination: /usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java -Xmx700m -Djava.awt.headless=true -Djava.endorsed.dirs="" -Dcompile.parallel=false -Drebuild.on.dependency.change=true -Djdt.compiler.useSingleThread=true -Daether.connector.resumeDownloads=false -Dio.netty.initialSeedUniquifier=-5972351880001011455 -Dfile.encoding=UTF-8 -Duser.language=en -Duser.country=US -Didea.paths.selector=IntelliJIdea2021.2 -Didea.home.path=/home/pm/idea-IU-212.4746.92 -Didea.config.path=/home/pm/.config/JetBrains/IntelliJIdea2021.2 -Didea.plugins.path=/home/pm/.local/share/JetBrains/IntelliJIdea2021.2 -Djps.log.dir=/home/pm/.cache/JetBrains/IntelliJIdea2021.2/log/build-log -Djps.fallback.jdk.home=/home/pm/idea-IU-212.4746.92/jbr -Djps.fallback.jdk.version=11.0.11 -Dio.netty.noUnsafe=true -Djava.io.tmpdir=/home/pm/.cache/JetBrains/IntelliJIdea2021.2/compile-server/rfg-survey-api_cc70fc05/_temp_ -Djps.backward.ref.index.builder=true -Djps.track.ap.dependencies=false --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED Unrecognized option: --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. The program will exit.
You have encountered the error ”Could not create the Java Virtual Machine” because your configuration is flawed. This error indicates that your computer’s Java installation is unable to start the virtual sandbox (virtual machine) in which the Java app would ordinarily run.
How To Fix The Error ”Could not create the Java Virtual Machine”
Solution 1: Apply this sequence and returning to JDK8
The method to solve to the error ”Could not create the Java Virtual Machine” is applying this sequence and returning to JDK8.
- Navigate to File
- Choose Project Structure.
- Then, select Project Settings. Choose a Project.
- You may take a look at the language level.
- Return it to 8
- Start running your code
After you do that, your error will completely disappear.
Solution 2: Check the installation of Java
There is another solution for you resolve your problem. It is checking the installation of Java. Let’s follow these steps to further understand about this method:
- Look for cmd in the Windows taskbar’s search box.
2. Right click on the icon of command prompt which is appearing and choose run as admin.
3. Next, enter “java – version” there and press OK.
4. Now, click on this link to see if you have the most recent version installed. Let’s install the most recent version on your PC if necessary.
That’s all about this method. It is very simple, isn’t it? However, it has enormous efficiencies. It will help you resolve your problem and your program will run well after you do it. So, what are you waiting without applying it for your error? Let’s do it to get your desired results.
Our article should have helped you how to resolve the Error: Could not create the Java Virtual Machine. The solution may not be optimal, but you can add your idea to make it more suitable.
If you have any thoughts regarding this problem, or if you want further assistance, please leave them in the comments. Thank you!