fix: убираем дублирующую проверку isHeadless из UIWindow
раньше UIWindow сам проверял isHeadless и выбрасывал исключение теперь доверяем проверке в Main с учётом переменной DISPLAY
This commit is contained in:
@@ -17,11 +17,6 @@ public class UIWindow extends Application {
|
|||||||
private static int port;
|
private static int port;
|
||||||
|
|
||||||
public static void start(int port) {
|
public static void start(int port) {
|
||||||
// Backup проверка headless
|
|
||||||
if (java.awt.GraphicsEnvironment.isHeadless()) {
|
|
||||||
throw new RuntimeException("Headless environment - no display available");
|
|
||||||
}
|
|
||||||
|
|
||||||
UIWindow.port = port;
|
UIWindow.port = port;
|
||||||
UIWindow.url = "http://localhost:" + port;
|
UIWindow.url = "http://localhost:" + port;
|
||||||
Application.launch(UIWindow.class);
|
Application.launch(UIWindow.class);
|
||||||
|
|||||||
Reference in New Issue
Block a user