0

Here is a link to the project I am working on: http://www.tutorialspoint.com/viewproject.php?URL=compile_java8_online.php&PID=0Bw_CjBb95KQMRnVYcWhvTHVzUzg It works fine when I run it in Netbeans on my desktop(java 8) but gives me this error when I run it at the link above. It looks like the error might be due to the online compiler not being compatible with the JFrame graphics in some way.

1 Answer 1

2

It's because your code is running in a headless environment (no GUI) yet you are creating and using a GUI.

It works fine on your computer because you have a GUI and everything required to display those graphical components.

You can fix/prevent this by creating a program that runs in the terminal and only accepts text input, or installing some sort of virtual gui on the machine that runs it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.