-1

I have a maven project I want to run it using 64 bit jvm in the project run configuration under VM arguments I set the following

-vm C:/Program Files/Java/jdk1.8.0_60/bin

It says Unrecognized option -vm

Can anyone tell me how to set jvm from VM arguments?

Thanks

Ragnar
  • 645
  • 8
  • 28
  • 2
    http://stackoverflow.com/questions/2503658/specify-jdk-for-maven-to-use – assylias Feb 10 '16 at 17:22
  • I changed my JAVA_HOME variable in Enviromant variables but I still get the error – Ragnar Feb 10 '16 at 17:32
  • Error occurred during initialization of VM Could not reserve enough space for 1945600KB object heap – Ragnar Feb 10 '16 at 17:32
  • 1
    You are trying to reserve 2GB of heap to run maven (by using `-Xmx2g` or something similar). You probably don't want that... See for example: http://stackoverflow.com/questions/2819853/setting-java-heap-space-under-maven-2-on-windows – assylias Feb 10 '16 at 17:48

1 Answers1

0

As you highlighted in one of your comments, after changing JAVA_HOME to another VM, you are getting a error message saying:

Error occurred during initialization of VM

Could not reserve enough space for 1945600KB object heap

The problem here is that some configuration is setting the -Xms argument to something around 2G or 2048M. Look into your run configuration and remove that setting. If you are experiencing OutOfMemoryError: Java heap space, look at this answer.

Community
  • 1
  • 1
randers
  • 5,031
  • 5
  • 37
  • 64