Revision as of 11:46, 19 November 2013 by Oliverrettig (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)

NBI Working Directory

General Information

NBI working directory is the directory that is used for storing installation registry, log files, data required for uninstallation (logic files and installed files list) and so on.
It can be overrding using --userdir <dir> command-line option.

Developers` note

For those, who write own installers based on NBI engine it is possible to use separate directory (not default ~/.nbi) for the installer.
To do that, developer should specify nbi.local.directory.path property in engine properties file (data/engine.properties).
This path is passed through the SystemUtils.resolveString() so the following tricks can be used:

nbi.local.directory.path=$N{home}/.nbi (this is equal to the default value)
nbi.local.directory.path=$S{user.home}/.nbi (the same as above)

LocalDirectoryHelper can be the helper class with static method "String getLocalDirectory()" that returns local directory with hostname prefix, for example:

package org.netbeans.installer.utils.helper;
public class HostLocalDirectory {
    public static String getLocalDirectory() {
        String hostName = null;
        try {
            hostName = java.net.InetAddress.getLocalHost().getHostName();
        } catch (java.net.UnknownHostException e) {
            hostName = "localhost";
        return new java.io.File(SystemUtils.getUserHomeDirectory(), ".nbi_" + hostName).getAbsolutePath();
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo