How can I guarantee a restart of the X server from Java Swing?
As I posted, shutting down JPanel windows under certain circumstances causes the X server to stay in an intermittent state. I have tried the following:
- Click the close box w/
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)configured caused subsequent runs to create windows with partial functionality. (I have since changed to
- Right-click on the X server (to enable the
fluxboxmenu) and exit was a disaster. No graphics worked after that (though I am not sure how to describe it exactly).
- Closing everything (Chrome, OS, etc.), clearing all browser data, and relogging into repl.it. This just puts me back into the https://RedCrossRedTargetAssignment.psb-david-petty.repl.run window unchanged.
- Waiting overnight seems to have 'reset' the X server (though, how long do users of repl.it Java Swing have to wait?).
I would really like to be able to shut down or restart the X server reliably (under control of the .replit file) from a Java Swing repl!
Try using the shell command
Other commands to try are
pkill Xorg or
If all else fails, I believe the whole container can be forcefully restarted with the shell command