Maven project import: Unrecognized option: -d64

Answered

Hello all,

I'm upgrading a Spring Boot 2.0.2 application from Java 8 to Java 10. After performing all the JDK 10 configuration changes in the IDE, I can compile the app and run it from the command line (using mvn spring-boot:run) with no problems. However, the only problem I'm running into is when updating the pom.xml file and trying to re-import the Maven changes from the IDE, I get this error: Unable to import Maven project - see logs for details.

When I look at the logs, this is the problem, and I'm not sure how to resolve it:

Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

    at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:161)
    at org.jetbrains.idea.maven.server.MavenServerManager.create(MavenServerManager.java:66)
    at org.jetbrains.idea.maven.server.RemoteObjectWrapper.getOrCreateWrappee(RemoteObjectWrapper.java:41)
    at org.jetbrains.idea.maven.server.MavenServerManager.lambda$applyProfiles$3(MavenServerManager.java:526)
    at org.jetbrains.idea.maven.server.RemoteObjectWrapper.perform(RemoteObjectWrapper.java:76)
    ... 33 more
Caused by: com.intellij.execution.ExecutionException: Unrecognized option: -d64
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

I've googled around trying to search for the unrecognized option -d64, but no luck so far.

For reference, I'm using IntelliJ 2018.2 Ultimate Edition and Maven 3.5.4 with JDK 10.0.2.

Thanks.

 

0
2 comments
Avatar
Permanently deleted user

Thanks Serge. That solved the problem for me.

0

Please sign in to leave a comment.