levo
Posts: 1
Joined: Thu Feb 25, 2016 1:18 pm

Java GUI Problem

Thu Feb 25, 2016 1:59 pm

Hello,

I have a Java application without any GUI on NetBeans(on my windows 7 computer) and I can run and debug it on Raspberry Pi 2 using remote java run time property.
However, when I try to run and debug another Java application with Swing GUI on Raspberry Pi 2 using the same remote java run time approach, I get the exception: "No X11 DISPLAY variable was set, but this program performed an operation which requires it." My Raspberry Pi 2 has a monitor connected via HDMI.

I do not want and need to see the application's GUI on my windows 7 computer but I must see and interact the GUI on Raspberry Pi 2's monitor. How can I do that?

Thanks

ghans
Posts: 7533
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Java GUI Problem

Thu Feb 25, 2016 2:46 pm

• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

thioaana
Posts: 3
Joined: Sat Dec 05, 2015 8:55 am

Re: Java GUI Problem

Sun Dec 17, 2017 6:37 pm

Hi,
i also have the problem described above.

Can anybody help me ?

thioaana
Posts: 3
Joined: Sat Dec 05, 2015 8:55 am

Re: Java GUI Problem

Mon Dec 25, 2017 7:28 am

Hi again.
I found it.
In case someone else will have the same problem, the solution is the next two lines
export DISPLAY=IpWindowsUser:0.0
sudo /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/bin/java -Dfile.encoding=UTF-8 -jar CarController_1.jar (for my project).
:) :) :) :) :) :) :) :)

Return to “Java”

Who is online

Users browsing this forum: No registered users and 2 guests