Could not create the Java virtual machine

后端 未结 5 1731
野性不改
野性不改 2021-02-06 22:09

facing some problem with java virtual machine initialization. when i am using root account i can properly work with java. but when i am a user account it returns following error

相关标签:
5条回答
  • 2021-02-06 22:44

    Set the JVM memory:

    export _JAVA_OPTIONS=-Xmx512M

    0 讨论(0)
  • 2021-02-06 22:47

    Make sure the physical available memory is more then VM defined min/max memory.

    0 讨论(0)
  • 2021-02-06 22:50

    Just be careful. You will get this message if you try to enter a command that doesn't exist like this

    /usr/bin/java -v

    0 讨论(0)
  • 2021-02-06 22:54

    The problem got resolved when I edited the file /etc/bashrc with same contents as in /etc/profiles and in /etc/profiles.d/limits.sh and did a re-login.

    0 讨论(0)
  • 2021-02-06 23:04

    I had this issue today, and for me the problem was that I had allocated too much memory:

    -Xmx1024M -XX:MaxPermSize=1024m

    Once I reduced the PermGen space, everything worked fine:

    -Xmx1024M -XX:MaxPermSize=512m

    I know that doesn't look like much of a difference, but my machine only has 4GB of RAM, and apparently that was the straw that broke the camel's back. The Java VM was failing immediately upon every action because it was failing to allocate the memory.

    0 讨论(0)
提交回复
热议问题