This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Should at least check for existence of ${netbeans.dirs} property (path-like string). Or, use Class.protectionDomain.codeSource.location to find installed files relative to testtools.jar itself.
Issue #28683 suggests a more general solution.
Testtools module does not use ${netbeans.home} itself it only allows to override this property and forwards it to XTest. I don't know about ${netbeans.dirs} substituition nor about its function in XTest so I am not able to change anything. Deep impact on XTest harness must be considered before removing or changing ${netbeans.home} property function but TT module can be changed only afterward.
"Testtools module does not use ${netbeans.home} itself it only allows to override this property and forwards it to XTest." - are you sure? E.g. in XTestCompilerType I see: String home=System.getProperty("netbeans.home"); if (!new File(home+File.separator+"xtest-distribution").exists()) home=System.getProperty("netbeans.user"); xtestHome=new File(home+File.separator+"xtest-distribution"); jemmyHome=new File(home+File.separator+"modules"+File.separator+"ext"); jellyHome=new File(home+File.separator+"modules"+File.separator+"ext"); XTestExecutor is similar. This is exactly the kind of code which InstalledFileLocator is supposed to replace. Consider that the testtools NBM might be installed in the user directory, or that there might in the future be more than one user directory or installation directory. The function of netbeans.home has already potentially changed, cf. issue #27151. I don't know if it matters much for XTest since the launcher script and some other similar basic things will continue to always be in netbeans.home, though other modules may be installed elsewhere.