有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!


共 (1) 个答案

  1. # 1 楼答案

    经过一番搜寻,我终于找到了答案!这是因为我的计算机上有一个非英语用户名。我所需要做的就是添加System.setProperty("user.name","seconduser"); 到DesktopLauncher代码。最终代码应如下所示:

    public class DesktopLauncher {
    public static void main (String[] arg) {
        System.setProperty("user.name","seconduser");
        LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
        new LwjglApplication(new GameName(), config);
    }
    

    希望它能帮助别人