简体   繁体   English

在 JMeter 中的 MacOsX 上复制/粘贴失败

[英]Copy/Paste fails on MacOsX in JMeter

I am having no luck using the clipboard to copy/paste text between other applications and JMeter or vice-versa.我没有运气使用剪贴板在其他应用程序和 JMeter 之间复制/粘贴文本,反之亦然。 I am able to copy-paste text and test elements within JMeter.我能够在 JMeter 中复制粘贴文本和测试元素。

I'm running JMeter 2.11 via the binary distribution by running 'bin/jmeter.sh' on OS X 10.9.1 running Java 1.7.0_45.我通过二进制分发版运行 JMeter 2.11,方法是在运行 Java 1.7.0_45 的 OS X 10.9.1 上运行“bin/jmeter.sh”。 I have attempted to use the clipboard with System and Mac OS X look-and-feels, per this previous question: Strangely copying and pasting a text in Jmeter is not working for in Mac我尝试将剪贴板与 System 和 Mac OS X 外观和感觉一起使用,根据上一个问题: 奇怪地在 Jmeter 中复制和粘贴文本不适用于 Mac

I have also attempted, with no luck, this procedure to grant system clipboard permission to AWT: http://www.shodor.org/interactivate/resources/InstructionsCopyPaste/我也尝试过,但没有运气,这个过程授予 AWT 系统剪贴板权限: http : //www.shodor.org/interactivate/resources/InstructionsCopyPaste/

Any advice on what I can do to get JMeter to share a clipboard with the rest of the system?关于如何让 JMeter 与系统的其余部分共享剪贴板的任何建议?

在JMeter 2.12中,Mac上的复制粘贴行为得到了很大的改善。

Could you try this example from swing : 您能否从swing尝试以下示例:

This is to see if it's a JDK issue on Mavericks or JMeter one. 这是看这是Mavericks还是JMeter的JDK问题。

UPDATE on 8 september 2014: - Issue has been fixed, could you test Nightly Build 2014年9月8日更新:-问题已修复,您可以测试Nightly Build吗?

Installing JMeter runtime 安装JMeter运行时

Download the _bin and _lib files 下载_bin和_lib文件

Unpack the archives into the same directory structure 将档案解压缩到相同的目录结构中

The other archives are not needed to run JMeter. 运行JMeter不需要其他档案。

I was facing same issue with JMeter 2.11. 我遇到了JMeter 2.11的相同问题。

I saw the error below when I attempt to copy paste. 我在尝试复制粘贴时看到以下错误。

2014-02-01 10:28:08.166 java[80082:2517] * CPerformer: ignoring exception '* -[__NSArrayM insertObject:atIndex:]: object cannot be nil' raised during perform of selector '_nativeGetTypes:' on target '' with args '( )' 2014-02-01 10:28:08.166 java [80082:2517] * CPerformer:忽略异常'* -[__ NSArrayM insertObject:atIndex:]:在目标上执行选择器'_nativeGetTypes:'时引发对象不能为零与参数'()'

I stopped X11 (XQuartz) server in order to resolve the issue. 我停止了X11(XQuartz)服务器以解决此问题。

Any time I try and paste copied text into JMeter from the OS I get the same issue. 每当我尝试将复制的文本从操作系统粘贴到JMeter时,都会遇到相同的问题。 The same issue occurs when trying to paste into another application based on text copied in JMeter. 当尝试基于在JMeter中复制的文本粘贴到另一个应用程序时,会发生相同的问题。

Copy + Paste is fine within JMeter itself (ie copy + paste within the Java application itself works fine). 在JMeter本身中,Copy + Paste很好(即,在Java应用程序本身中,Copy + Paste可以正常工作)。

My environment is OSX 10.9.2, JMeter 2.11 r1554548, java version "1.7.0_55". 我的环境是OSX 10.9.2,JMeter 2.11 r1554548,Java版本“ 1.7.0_55”。

This is the error you get every time you try and paste into the app from the system clipboard: 这是您每次尝试从系统剪贴板粘贴到应用程序时遇到的错误:

2014-05-06 08:32:52.363 java[22814:d07] *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil
2014-05-06 08:32:52.364 java[22814:d07] (
        0   CoreFoundation                      0x00007fff8e63f25c __exceptionPreprocess + 172
        1   libobjc.A.dylib                     0x00007fff8b0b7e75 objc_exception_throw + 43
        2   CoreFoundation                      0x00007fff8e5006c7 -[__NSArrayM insertObject:atIndex:] + 951
        3   Foundation                          0x00007fff8eeb913e __NSThreadPerformPerform + 229
        4   CoreFoundation                      0x00007fff8e570731 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
        5   CoreFoundation                      0x00007fff8e561ea2 __CFRunLoopDoSources0 + 242
        6   CoreFoundation                      0x00007fff8e56162f __CFRunLoopRun + 831
        7   CoreFoundation                      0x00007fff8e5610b5 CFRunLoopRunSpecific + 309
        8   HIToolbox                           0x00007fff84fe3a0d RunCurrentEventLoopInMode + 226
        9   HIToolbox                           0x00007fff84fe37b7 ReceiveNextEventCommon + 479
        10  HIToolbox                           0x00007fff84fe35bc _BlockUntilNextEventMatchingListInModeWithFilter + 65
        11  AppKit                              0x00007fff8856d3de _DPSNextEvent + 1434
        12  AppKit                              0x00007fff8856ca2b -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
        13  libosxapp.dylib                     0x000000011533c4e3 -[NSApplicationAWT nextEventMatchingMask:untilDate:inMode:dequeue:] + 124
        14  AppKit                              0x00007fff88560b2c -[NSApplication run] + 553
        15  libosxapp.dylib                     0x000000011533c346 +[NSApplicationAWT runAWTLoopWithApp:] + 156
        16  liblwawt.dylib                      0x0000000115bb7999 -[AWTStarter starter:] + 873
        17  Foundation                          0x00007fff8eeb913e __NSThreadPerformPerform + 229
        18  CoreFoundation                      0x00007fff8e570731 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
        19  CoreFoundation                      0x00007fff8e561ea2 __CFRunLoopDoSources0 + 242
        20  CoreFoundation                      0x00007fff8e56162f __CFRunLoopRun + 831
        21  CoreFoundation                      0x00007fff8e5610b5 CFRunLoopRunSpecific + 309
        22  java                                0x000000010a5183b0 CreateExecutionEnvironment + 871
        23  java                                0x000000010a512b5c JLI_Launch + 1952
        24  java                                0x000000010a51870d main + 101
        25  java                                0x000000010a5123b4 start + 52
        26  ???                                 0x0000000000000007 0x0 + 7

)

在 JDK 14 和 JMeter 5.4.3 上对我有用的是将外观设置更改为System

Options -> Look and Feel -> System

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM