【发布时间】:2015-06-11 20:58:06
【问题描述】:
我有一个需要从 .jar 可执行文件运行的 .bat 文件。我环顾四周,找不到明显的方法......无论如何这可以做到吗?帮助!如果有帮助,这是我现有的 .bat 代码:
@ECHO OFF
:: When setting the memory below make sure to include the amount of ram
:: letter. M = MB, G = GB. Don't use 1GB for example, it's 1G ::
:: This is 64-bit memory ::
set memsixtyfour=2G
:: This is 32-bit memory - maximum 1.2G ish::
set memthirtytwo=1G
:: Don't edit past this point ::
if $SYSTEM_os_arch==x86 (
echo OS is 32
set mem=%memthirtytwo%
) else (
echo OS is 64
set mem=%memsixtyfour%
)
java -Xmx%mem% -XX:MaxPermSize=256M -jar forge-1.7.10-10.13.2.1277-universal.jar nogui
PAUSE
【问题讨论】:
标签: java batch-file jar executable executable-jar