Java:找不到-Xmx1g类 [英] Java: Class -Xmx1g not found
问题描述
我正在尝试在服务器上运行一个名为"YouTrack"的程序.它确实可以正常工作,但是服务器重新启动后,当我想启动YouTrack时收到一条错误消息.
I am trying to run a Program called "YouTrack" on my server. It did always work, but after the server restarted i am getting an error message when i want to start YouTrack.
找不到类-Xmx1g.
Class -Xmx1g could not be found.
我正在执行以下命令:
java –Xmx1g –XX:MaxPermSize=500m –Djava.awt.headless=true –jar youtrack-6.5.16932.jar 8112
I am executing this command:
java –Xmx1g –XX:MaxPermSize=500m –Djava.awt.headless=true –jar youtrack-6.5.16932.jar 8112
我的系统:
- ubuntu 14.04
- Plesk
- java版本"1.7.0_79"
有人可以帮助我吗? 预先感谢.
Can anybody help me? Thanks in advance.
更新为Java版本"1.8.0_77".仍然不起作用.
Updated to java version "1.8.0_77". Still doesn't work.
推荐答案
Java 7是否允许在大小上使用"g"修饰符?我认为这是Java 8附带的.
Did Java 7 allow the "g" modifier on the size? I thought that came with Java 8.
- Java 7
http://docs.oracle.com/javase/7/docs/technotes/tools/solaris/java.html
-Xmxn 指定内存分配池的最大大小(以字节为单位).此值必须是大于2 MB的1024的倍数.追加字母k或K表示千字节,或者追加m或M表示兆字节.默认值是在运行时根据系统配置选择的.
-Xmxn Specifies the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2 MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is chosen at runtime based on system configuration.
- Java 8
https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html
-Xmxsize 指定内存分配池的最大大小(以字节为单位).此值必须是1024的倍数且大于2 MB.字母k或K表示千字节,m或M表示兆字节,g或G表示千兆字节.默认值是在运行时根据系统配置选择的.对于服务器部署,通常将-Xms和-Xmx设置为相同的值.请参见 http://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/index.html .
-Xmxsize Specifies the maximum size (in bytes) of the memory allocation pool in bytes. This value must be a multiple of 1024 and greater than 2 MB. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, g or G to indicate gigabytes. The default value is chosen at runtime based on system configuration. For server deployments, -Xms and -Xmx are often set to the same value. See the section "Ergonomics" in Java SE HotSpot Virtual Machine Garbage Collection Tuning Guide at http://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/index.html.
这篇关于Java:找不到-Xmx1g类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!