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.

Bug 28668 - Clean up usage of ${netbeans.home}
Summary: Clean up usage of ${netbeans.home}
Status: RESOLVED INCOMPLETE
Alias: None
Product: qa
Classification: Unclassified
Component: Test Tools (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@ide
URL:
Keywords: ARCH
Depends on: 28683
Blocks: 27151
  Show dependency tree
 
Reported: 2002-11-11 22:55 UTC by Jesse Glick
Modified: 2011-09-19 23:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2002-11-11 22:55:29 UTC
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.
Comment 1 Jesse Glick 2002-11-12 18:08:09 UTC
Issue #28683 suggests a more general solution.
Comment 2 Adam Sotona 2003-01-02 15:40:47 UTC
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.
Comment 3 Jesse Glick 2003-01-06 19:28:44 UTC
"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.