You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

能否通过JVM参数使已编译Java程序(Old School RuneScape)无边框?

Answers to Your Questions

1. Can JVM parameters make Old School RuneScape run borderless?

First off, the -Dorg.lwjgl.opengl.Window.undecorated=true parameter you found is specific to the LWJGL (Lightweight Java Game Library), not a universal JVM parameter. Since Old School RuneScape does use LWJGL for its window rendering, this parameter might actually work for you—give it a try when launching the game.

That said, JVM parameters themselves don’t have a built-in, universal setting to control window borders. Window decoration is managed by the UI framework the application uses (like Swing’s JFrame or LWJGL’s Window class). For Swing apps, you’d normally call setUndecorated(true) in code, but that’s not something you can toggle via a JVM parameter unless the app explicitly checks for a system property to enable this behavior.

If the LWJGL parameter doesn’t work, check if OSRS has any in-game settings or configuration files (like a .properties or .ini file) that let you enable borderless mode. On macOS, you could also use third-party window management tools to force borderless, but that’s a workaround rather than a native fix.

2. What’s the difference between JVM Options and JVM Arguments?

These terms are often used interchangeably, but there’s a subtle distinction:

  • JVM Options: These are parameters that directly control the JVM’s internal behavior. They include things like memory allocation (-Xmx2G, -Xms512M), garbage collection settings (-XX:+UseG1GC), debugging flags (-Xdebug), and version checks (-version). Most start with -X (non-standard) or -XX (experimental/advanced).
  • JVM Arguments: This is a broader term that encompasses JVM Options plus other parameters passed at launch. This includes system properties (-Dkey=value, like the LWJGL parameter you mentioned) and command-line arguments passed directly to the application’s main() method (e.g., java MyApp arg1 arg2 where arg1 and arg2 are app-specific arguments).

In practice, many developers refer to all launch parameters as "JVM Arguments"—the key thing is to differentiate between parameters that affect the JVM itself and those that pass data to the application.

3. Fixing the broken NSRequiresAquaSystemAppearance=NO on macOS Catalina

It’s frustrating when a previously working fix stops working. Here are a few things to check and try:

  • Verify the Info.plist entry: Make sure you added the key correctly inside the <dict> section of the app’s Contents/Info.plist file. The exact entry should be:
    <key>NSRequiresAquaSystemAppearance</key>
    <false/>
    
    If you reinstalled the game, this entry might have been overwritten—double-check and re-add it if needed.
  • Try JVM-level appearance properties: Instead of relying on the Info.plist, pass an appearance-related system property when launching the JVM. For example:
    • For dark mode: -Dapple.awt.application.appearance=NSAppearanceNameDarkAqua
    • For system default: -Dapple.awt.application.appearance=system
  • Check JRE embedding: If you’re using a system-wide AdoptOpenJDK 11 instead of a JRE embedded within the OSRS app bundle, the app’s Info.plist settings might not take precedence. Try embedding the JRE inside the app bundle (if possible) or check if the JRE’s own Info.plist has conflicting settings.
  • Game updates: It’s possible an OSRS update changed how the game handles window appearance, overriding the Info.plist setting. Check if the game has any in-game appearance settings you can adjust instead.

内容的提问来源于stack exchange,提问作者0x1801ce

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.09 12:17:30