Currently it's not possible to run the non-client tests without having the DISPLAY variable set. If it's not set then the following tests currently fail in jdk8/tl:
closed/java/sql/SQLPermission/SetLogStream.java
closed/java/sql/SQLPermission/SetLogWriter.java
closed/javax/management/security/ClientNotifForwarderTest.java
closed/sun/misc/Launcher/GrantedSunPackageAccess.java
demo/jvmti/mtrace/TraceJFrame.java
java/io/File/isDirectory/Applet.java
java/io/Serializable/resolveClass/deserializeButton/run.sh
This bug is submitted to re-examine these tests so that they won't require a display. This would make the tests more reliable in JPRT too as periodically the X11 locks up causing these tests to fail.