在阿里云 Linux 3.2104 64bits 上運行 start.sh
start.sh 內容:
#!/bin/sh
java -Xms3G -Xmx3G -XX: UseG1GC -XX: ParallelRefProcEnabled -XX:MaxGCPauseMillis=200
-XX: UnlockExperimentalVMOptions -XX: DisableExplicitGC -XX: AlwaysPreTouch
-XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M
-XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4
-XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90
-XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX: PerfDisableSharedMem
-XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs
-Daikars.new.flags=true -jar paper.jar nogui
然后控制臺輸出:
start.sh: line 4: -XX: UnlockExperimentalVMOptions: command not found
start.sh: line 5: -XX:G1NewSizePercent=30: command not found
start.sh: line 6: -XX:G1ReservePercent=20: command not found
start.sh: line 7: -XX:InitiatingHeapOccupancyPercent=15: command not found
start.sh: line 8: -XX:G1RSetUpdatingPauseTimePercent=5: command not found
start.sh: line 9: -XX:MaxTenuringThreshold=1: command not found
start.sh: line 10: -Daikars.new.flags=true: command not found
爪哇版:
OpenJDK Runtime Environment Corretto-17.0.2.8.1 (build 17.0.2 8-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.2.8.1 (build 17.0.2 8-LTS, mixed mode, sharing)```
I am not a native speaker, sorry for my poor explanation
uj5u.com熱心網友回復:
您的命令有多行 - 在 bash shell 中,這必須全部位于一行或使用行繼續符。所以你有兩個選擇:
全部在一條線上:
java -Xms3G -Xmx3G -XX: UseG1GC -XX: ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX: UnlockExperimentalVMOptions -XX: DisableExplicitGC -XX: AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX: PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar paper.jar nogui
或使用續行
java -Xms3G -Xmx3G -XX: UseG1GC -XX: ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 \
-XX: UnlockExperimentalVMOptions -XX: DisableExplicitGC -XX: AlwaysPreTouch \
-XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M \
-XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 \
-XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 \
-XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX: PerfDisableSharedMem \
-XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs \
-Daikars.new.flags=true -jar paper.jar nogui
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/455967.html
下一篇:重擊|變數中的變數
