Maven notes: maven cocould not create the Java Virtual Machine, mavenvirtual

Source: Internet
Author: User

Maven notes: maven cocould not create the Java Virtual Machine, mavenvirtual

1. Install maven and run mvn-v in cmd. the error "maven cocould not create the Java Virtual Machine" is returned"

2. Analysis: this is related to jvm. If java-version is run in cmd, it is normal.

3. Continue analysis: configure the environment variables when installing maven:

M2E_HOME: E: \ liberary \ maven

Path: % M2E_HOME % \ bin; (Add at the end of the Path variable)

MAVEN_OPTS:-Xms128m-Xmx512m

The MAVEN_OPTS variable is set because the default maximum memory of java is often insufficient for maven to run.-Xms128m indicates that the JVM occupies a minimum of MB of memory, and-Xmx256m indicates that the JVM occupies a maximum of MB of memory.

4. Check Environment Variables

Found: the word is wrong (if there is more than nothing, there will be a problem, no space), change I to X

5. correct modification. Run mvn-v again in cmd.

Analysis: the problem has been solved.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.