Why am i not able to click on open icon in Jmeter?

Below is the error i get,while clicking on open icon:

2021-05-20 12:11:25,651 ERROR o.a.j.JMeter: Uncaught exception in thread Thread[AWT-EventQueue-0,6,main]
java.lang.IllegalAccessError: class com.github.weisj.darklaf.ui.filechooser.DarkFilePaneUIBridge$DetailsTableModel (in unnamed module @0x21507a04) cannot access class sun.awt.shell.ShellFolder (in module java.desktop) because module java.desktop does not export sun.awt.shell to unnamed module @0x21507a04
    at com.github.weisj.darklaf.ui.filechooser.DarkFilePaneUIBridge$DetailsTableModel.updateColumnInfo(DarkFilePaneUIBridge.java:1128) ~[darklaf-core-2.5.4.jar:2.5.4]
    at com.github.weisj.darklaf.ui.filechooser.DarkFilePaneUIBridge$DetailsTableModel.<init>(DarkFilePaneUIBridge.java:1115) ~[darklaf-core-2.5.4.jar:2.5.4]
    at com.github.weisj.darklaf.ui.filechooser.DarkFilePaneUIBridge.getDetailsTableModel(DarkFilePaneUIBridge.java:576) ~[darklaf-core-2.5.4.jar:2.5.4]
    at com.github.weisj.darklaf.ui.filechooser.DarkFilePaneUIBridge$SortableListModel.<init>(DarkFilePaneUIBridge.java:1079) ~[darklaf-core-2.5.4.jar:2.5.4]
    at com.github.weisj.darklaf.ui.filechooser.DarkFilePane.createList(DarkFilePane.java:137) ~[darklaf-core-2.5.4.jar:2.5.4]
    at com.github.weisj.darklaf.ui.filechooser.DarkFileChooserUIBridge.createList(DarkFileChooserUIBridge.java:585) ~[darklaf-core-2.5.4.jar:2.5.4]
    at com.github.weisj.darklaf.ui.filechooser.DarkFileChooserUIBridge$MetalFileChooserUIAccessor.createList(DarkFileChooserUIBridge.java:750) ~[darklaf-core-2.5.4.jar:2.5.4]
    at com.github.weisj.darklaf.ui.filechooser.DarkFilePaneUIBridge.setViewType(DarkFilePaneUIBridge.java:376) ~[darklaf-core-2.5.4.jar:2.5.4]
    at com.github.weisj.darklaf.ui.filechooser.DarkFilePaneUIBridge.propertyChange(DarkFilePaneUIBridge.java:890) ~[darklaf-core-2.5.4.jar:2.5.4]
    at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:342) ~[?:?]
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:334) ~[?:?]
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:267) ~[?:?]
    at java.awt.Component.firePropertyChange(Component.java:8713) ~[?:?]
    at javax.swing.JComponent.setUI(JComponent.java:688) ~[?:?]
    at javax.swing.JFileChooser.updateUI(JFileChooser.java:1838) ~[?:?]
    at javax.swing.JFileChooser.setup(JFileChooser.java:395) ~[?:?]
    at javax.swing.JFileChooser.<init>(JFileChooser.java:361) ~[?:?]
    at javax.swing.JFileChooser.<init>(JFileChooser.java:308) ~[?:?]
    at org.apache.jmeter.gui.util.FileDialoger.<clinit>(FileDialoger.java:42) ~[ApacheJMeter_core.jar:5.4.1]
    at org.apache.jmeter.gui.action.Load.doActionAfterCheck(Load.java:75) ~[ApacheJMeter_core.jar:5.4.1]
    at org.apache.jmeter.gui.action.AbstractActionWithNoRunningTest.doAction(AbstractActionWithNoRunningTest.java:44) ~[ApacheJMeter_core.jar:5.4.1]
    at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:87) ~[ApacheJMeter_core.jar:5.4.1]
    at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:69) ~[ApacheJMeter_core.jar:5.4.1]
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:316) ~[?:?]
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) ~[?:?]
    at java.awt.EventQueue$4.run(EventQueue.java:721) ~[?:?]
    at java.awt.EventQueue$4.run(EventQueue.java:715) ~[?:?]
    at java.security.AccessController.doPrivileged(AccessController.java:391) ~[?:?]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) ~[?:?]
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:740) ~[?:?]
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) [?:?]
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) [?:?]
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) [?:?]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) [?:?]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:?]
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:90) [?:?]

Solution 1:

Consider changing your JMeter Theme to Windows Classic(Options -> Look and Feel -> Windows classic)

Solution 2:

The solution was changing the theme!

Try the following:

Open JMeter -> Options -> Look and Feel -> Select System theme.
Restart JMeter.

Solution 3:

This might be related to the dark mode of JMeter. Atleast for me this solved the issue by changing it to non-dark theme. System Info : OS - macOS Big Sur Jmeter Version - 5.4.1 Java version - 16 Reference

Solution 4:

Sounds like you're facing a JDK bug 482318, try changing your Java to another version, i.e.

  • Upgrade to Java 11 (it's LTS release)
  • Downgrade to Java 8 (it's the minimum version capable of running JMeter 5.4.1)

You can also try switching to cross-platform look and feel by running JMeter as:

jmeter -Jjmeter.laf=CrossPlatform ....

if it helps you can make the change permanent by adding the next line to user.properties file:

jmeter.laf=CrossPlatform

and last but not the least, you can open a .jmx script in GUI mode by providing it via -t argument like:

jmeter -t /path/to/your/test.jmx

this way JMeter will start and open your test plan (hopefully)

More information:

  • Configuring JMeter
  • Full list of command-line options
  • Apache JMeter Properties Customization Guide

Solution 5:

I had the same issue, found this workaround, which is not working for me:

adding the following to the JAVA9_OPTS variable in jmeter.bat: --add-opens=java.desktop/sun.awt.shell=ALL-UNNAMED

Source: https://bz.apache.org/bugzilla/show_bug.cgi?id=65300#c3

Instead, using the 5.5 snapshot of JMeter of today is working for me: https://ci-builds.apache.org/job/JMeter/job/JMeter-trunk/lastSuccessfulBuild/artifact/src/dist/build/distributions/