Skip to content

Jmeter NullPointerException when running the GUI

I have installed Jmeter using

brew install Jmeter

when I run


from command line i get this error:

mac@macbook ~ $ jmeter
Don't use GUI mode for load testing !, only for Test creation and Test
debugging. For load testing, use CLI Mode (was NON GUI):    
 jmeter -n -t [jmx file] -l [results file] -e -o [Path to web report folder] & increase Java Heap to meet your test requirements:    Modify current
env variable HEAP="-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m" in the
jmeter batch file Check :
An error occurred: null

I checked the jmeter.log file and this is what I get:

2019-12-03 09:48:06,190 ERROR o.a.j.JMeter: An error occurred: 
java.lang.NullPointerException: null  at
java.awt.Window.init( ~[?:1.8.0_231]  at
java.awt.Window.<init>( ~[?:1.8.0_231]    at
java.awt.Frame.<init>( ~[?:1.8.0_231]  at
java.awt.Frame.<init>( ~[?:1.8.0_231]  at
~[?:1.8.0_231]    at
~[?:1.8.0_231]    at javax.swing.JWindow.<init>(
~[?:1.8.0_231]    at javax.swing.JWindow.<init>(
~[?:1.8.0_231]    at
~[ApacheJMeter_core.jar:5.2.1]    at
~[ApacheJMeter_core.jar:5.2.1]    at
[ApacheJMeter_core.jar:5.2.1]     at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[?:1.8.0_231]    at
~[?:1.8.0_231]    at
~[?:1.8.0_231]    at java.lang.reflect.Method.invoke(
~[?:1.8.0_231]    at

Java version:

java version "1.8.0_231" Java(TM) SE Runtime Environment (build
1.8.0_231-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)

anyone was able to fix this?



Can it be the case you’re using DisplayLink? If so, most probably you’re suffering from Java Apps crash on launch if connected to external DisplayLink device issue.

According to the 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure article:

Use Up-to-Date Software

Your test might fail if your software is out of date. Make sure you’re using the most recent versions of the following:

Java – use the latest 64-bit version of Java SE JDK or Server JRE where possible

So if you have to stay at Java 8 – consider upgrading to Java SE Development Kit 8u231 (or whatever is the latest stable patch level), otherwise obtain the latest version of Java Runtime Environment or SDK

If you cannot amend Java version – consider removing this DisplayLink device.

9 People found this is helpful