Error occurred during initialization of VM - IntelliJ

Answered

I can not run my app because of this message:

C:\Util\jdk-11.0.2\bin\java.exe -Dmaven.multiModuleProjectDirectory=C:\Users\A106303453\Projects\myProject-Dmaven.home=C:\Util\apache-maven-3.6.3 -Dclassworlds.conf=C:\Util\apache-maven-3.6.3\bin\m2.conf "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA 2020.2.3\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2020.2.3\lib\idea_rt.jar=62758:C:\Program Files\JetBrains\IntelliJ IDEA 2020.2.3\bin" -Dfile.encoding=UTF-8 -classpath C:\Util\apache-maven-3.6.3\boot\plexus-classworlds-2.6.0.jar;C:\Util\apache-maven-3.6.3\boot\plexus-classworlds.license org.codehaus.classworlds.Launcher -Didea.version=2020.2.3 -s C:\Users\A106303453\.m2\settings.xml -Dmaven.repo.local=C:\Users\A106303453\.m2\repository clean install
Error occurred during initialization of VM
Could not find agent library instrument on the library path, with error: Can't find dependent libraries
Module java.instrument may be missing from runtime image.

Do you have hints where is the problem?

0
8 comments

Hello Gabor,

Are you getting this error in the IDE? Are you able to run the app from the command line or system terminal with the same options?

Try restarting the IDE via the File | Invalidate Caches & Restart option, and then reloading your Maven project (r-click on pom.xml > Maven > Reload project).

If it doesn't help, please provide a demo project where this can be reproduced, and describe the steps you took to do it.

1
Avatar
Permanently deleted user

Yes, I'm getting the error in the  IDE.

If I build the project first and after I run it, it is working. If I put the "build" in the "Before Launch" or try to use the debug mode the message is coming up.

Also, if I press double Ctrl and try to run "mvn clean install" or any other mvn command the issue is the same, getting this error message.

If I open a Terminal in the IDE it is working well.

0

@... Can you please provide a screenshot of your Run/Debug configuration and collect diagnostic data after restarting the IDE and reproducing the problem? (Help | Collect Logs and Diagnostic Data)

Does it help if you re-create the Run/Debug configuration?

The files can be uploaded at https://uploads.jetbrains.com . (please do not forget to specify the Upload ID) 

0
Avatar
Permanently deleted user

The debugger and the "Build' Before Launch is working now (after "File | Invalidate Caches & Restart "), but the double Ctrl (run Anything) mvn commands still giving back the error message.

0

> double Ctrl (run Anything) mvn commands still giving back the error message.

It also makes sense to manually remove/rename all IDE directories as per https://intellij-support.jetbrains.com/hc/en-us/articles/206544519-Directories-used-by-the-IDE-to-store-settings-caches-plugins-and-logs .

If the problem remains could you attach the information requested above?

1
Avatar
Permanently deleted user

Dear All,

The problem has been solved! Thanks a lot! :)

0

@... Could you please list down the steps to resolve this error. Facing same issue.

Able to run the application but not able to debug the same.

0

Vcvinnu have you tried suggestions posted above?

Which Build System your Project uses (Gradle, Maven, IDEA Native)?

Could you please share a screenshot of the failing Run/Debug Configuration?

0

Please sign in to leave a comment.