• 【MineBBS社区发展意见征集】

    欢迎参与MineBBS社区调查,助力打造更好Minecraft社区!完成问卷可获赠200金粒,优质回答可额外获得200金粒(限5名),快来参与吧!【点击参与】

已解决 1.20.4+的Forge版服务端产生的shim.jar是干什么用的

午夜_Midnight

【Lv:4】

正式会员
注册
2021/08/24
消息
55
金粒
3,498金粒
如题,1.20.4及之后的forge版服务端会在根目录产生一个“forge-1.20.6-50.0.29-shim.jar”,同时在自带的run.bat内多出了几行东西:

代码:
java -jar forge-1.20.6-50.0.29-shim.jar --onlyCheckJava
if %ERRORLEVEL% NEQ 0 (
    echo.
    echo If you're struggling to fix the error above, ask for help on the forums or Discord mentioned in the readme.
    goto :exit
)

REM Add custom program arguments (such as nogui) to the next line before the %* or pass them to this script directly
java @libraries/net/minecraftforge/forge/1.20.6-50.0.29/win_args.txt %* -nogui

:exit
pause

求知道的大佬解答一下这个shim.jar文件具体有什么用?谢谢。

1716449341585.png
 
解决方案
应该是作为一个EntryPoint, 在实际启动之前先检查Java是否符合要求, 同时1.20.4把unix的arg和win的arg拆开了, 看commit是提高了面板的兼容性
应该是作为一个EntryPoint, 在实际启动之前先检查Java是否符合要求, 同时1.20.4把unix的arg和win的arg拆开了, 看commit是提高了面板的兼容性
 
解决方案

在线会员

  • BAsaltWSXuan
  • Halin
  • Little_Flower_7XX
  • 夏·辰星
  • linkkkkkkkkkk
  • Yamadaryo
  • Am 247
  • XiXia
  • 方块传说
  • 冷凍烏薩齊
  • 17742432529
  • waiwai_awa
  • 碎语
  • Yiran233
  • QinKun
  • HoshinoAi
  • HelloWorldCoder
  • taoxiaobai
  • haishen668
  • haixing
...和 71 更多。
后退
顶部 底部