我在Ubuntu的java程序中使用processBuilder创建进程:
pb = new ProcessBuilder(CHROME_UBUNTU_PATH, "--headless","--enable-logging", "--disable-gpu","--print-to-pdf=" + filePath + ".pdf","file:///" + absolutePath);
pb.start();
但Chrome不会启动,因为它以root用户身份运行:
Running as root without --no-sandbox is not supported.
所以我用非root用户启动了我的Jboss,但是在sudoers组中
但仍会出现同样的错误。
我该怎么办?