DoctorC Posted January 12, 2021 Share Posted January 12, 2021 (edited) At the moment I'm using Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection("String here"), null); But, it's giving a java.awt.HeadlessException: at sun.awt.HeadlessToolkit.getSystemClipboard(HeadlessToolkit.java:309) I've checked some source code and It's pretty much identical. Does anyone know what is causing this and how I could solve it? Edited January 12, 2021 by DoctorC Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.