netbeans 如何设置“X11 DISPLAY变量设置”?

iyfjxgzm  于 2022-11-10  发布在  其他
关注(0)|答案(1)|浏览(238)

I'm trying to remote into my raspberry with netbeans in Windows 10, but there is a report like this picture. I have received the following error, and I do not understand it. I see that some X11 DISPLAY variable needs to be set, but what value should I give it and how? I ever to trying with XMING but still same.
How can I fix this?
Connecting to 192.168.137.75:22 cmd : cd '/home/pi/NetBeansProjects//Gcrypt'; '/usr/bin/java' -Dfile.encoding=UTF-8 -jar /home/pi/NetBeansProjects//Gcrypt/dist/Gcrypt.jar Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. at java.awt.GraphicsEnvironment.checkHeadless (GraphicsEnvironment.java:204) at java.awt.Window.<init> (Window.java:536) at java.awt.Frame.<init> (Frame.java:420) at java.awt.Frame.<init> (Frame.java:385) at javax.swing.JFrame.<init> (JFrame.java:189) at gui.Main.<init> (Main.java:21) at gui.Main$4.run (Main.java:162) at java.awt.event.InvocationEvent.dispatch (InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl (EventQueue.java:756) at java.awt.EventQueue.access$500 (EventQueue.java:97) at java.awt.EventQueue$3.run (EventQueue.java:709) at java.awt.EventQueue$3.run (EventQueue.java:703) at java.security.AccessController.doPrivileged (Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege (ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent (EventQueue.java:726) at java.awt.EventDispatchThread.pumpOneEventForFilters (EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter (EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:93) at java.awt.EventDispatchThread.run (EventDispatchThread.java:82)

ykejflvf

ykejflvf1#

解决方案在错误消息中:未设置X11 DISPLAY变量,但此程序执行了一个需要它的操作。
首先使用此命令设置DISPLAY变量,然后运行程序

export DISPLAY=yourRemoteHostHere:0.0

相关问题