cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Avoiding HeadlessException on Clipboard

由板_10473958
2-Explorer

Avoiding HeadlessException on Clipboard

I am using Windchill PDMLink Release 12.1 and Datecode with CPS 12.1.2.7

I tried to copy a string of a list of file names to the clipboard in a custom jsp, but I got the following error:

Windchill JSP Exception nested exception: java.awt.HeadlessException

Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();

An error occurred at this point.

StringSelection selection = new StringSelection(str);

clipboard.setContents(selection, null);

Please tell me how to avoid this error and use the clipboard.

Here are the errors that I faced

Windchill JSP Exception nested exception: java.awt.HeadlessException

 

--------------------------------------------------------

Translated the topic from Japanese to English using google translate 

Subject - クリップボードのHeadlessException回避

Body - I am using Windchill PDMLink Release 12.1 and Datecode with CPS 12.1.2.7 
カスタマイズjspでクリップボードにファイル名のリストの文字列をコピーしようとしましたが 
Windchill JSP 例外 ネステッド例外: java.awt.HeadlessException 
が出ます 
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); 
この時点でエラー 
StringSelection selection = new StringSelection(str); 
clipboard.setContents(selection, null); 
このエラーを回避してクリップボードを使う方法を教えてください 

Here are the errors that I faced 
Windchill JSP 例外 ネステッド例外: java.awt.HeadlessException

-By Community Moderation Team

--------------------------------------------------------

ACCEPTED SOLUTION

Accepted Solutions

Article - ""Windchill JSP Exception Nested exception is:java.lang.NullPointerException" error merssage is thrown out on Change Monitor page in Windchill PDMLink": https://www.ptc.com/en/support/article/CS205558 

View solution in original post

1 REPLY 1

Article - ""Windchill JSP Exception Nested exception is:java.lang.NullPointerException" error merssage is thrown out on Change Monitor page in Windchill PDMLink": https://www.ptc.com/en/support/article/CS205558 

Announcements

Top Tags