0

I keep getting this in java. what does this mean I made my code in the eclipse IDE but am now opening it up in my terminal and keep getting this.

6
  • Please edit and show what you enter at the command prompt. For example, are you using javaw.exe or java.exe? Commented Sep 21, 2022 at 21:09
  • 1
    Are you by any chance attempting to run a GUI program without a GUI? Commented Sep 21, 2022 at 21:10
  • stackoverflow.com/questions/19507096/… is the same error but python, are you executing python from java or something like that? The error itself indicates that the current environment has no (access to) the the GUI system (en.wikipedia.org/wiki/X_Window_System). i.e. it can only print text. Commented Sep 21, 2022 at 21:36
  • Check out running Java in headless mode: oracle.com/technical-resources/articles/javase/headless.html Commented Sep 21, 2022 at 22:35
  • Yes but of course that is only appropriate if it is not a GUI program Commented Sep 21, 2022 at 22:45

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.