0

Does anyone know how to debug Java code in non-graphical mode in NetBeans 8.2 by setting the variable $DISPLAY=""? Using export DISPLAY= in Linux terminal I only set it within one terminal but no globally in system.

UPDATE

I added the DISPLAY variable using the method given in How to set environment variables in Netbeans 8.0.2 but but if I set export DISPLAY="" or export DISPLAY= then NetBeans doesn't start from Terminal and says that DISPLAY variable is not set. How to set empty DISPLAY variable properly?

Michael
  • 15
  • 6
  • Does this answer your question? [How to debug a jar remotely from netbeans](https://stackoverflow.com/questions/24536880/how-to-debug-a-jar-remotely-from-netbeans) – lehanh Jun 02 '23 at 10:39
  • The above link points to the use of Xdebug, which I am not familiar with. I would like NetBeans to use the $DISPLAY="" environment variable when starting "Debug Project". – Michael Jun 02 '23 at 11:19
  • 2
    I do not have Netbeans, but there must be some option/setting allowing to set environment variables used the running some code (and in unix, AFAIK `export`ing a variable makes it available to all subprocesses of the actual process (or so) – user16320675 Jun 02 '23 at 11:22
  • 2
    maybe [How to set environment variables in Netbeans 8.0.2?](https://stackoverflow.com/questions/33484550/how-to-set-environment-variables-in-netbeans-8-0-2) or [setting enviromental variables in netbeans](https://stackoverflow.com/questions/9618787/setting-enviromental-variables-in-netbeans) (first 2 links from searching... .but I have not checked its content) – user16320675 Jun 02 '23 at 11:25
  • Yes, I think it's about setting the environment variable in the Run options. I tried entering the Env.DISPLAY variable with empty value and it's not working for me yet, but I think this is the right direction. – Michael Jun 02 '23 at 11:45

0 Answers0