<?xml version="1.0" encoding="UTF-8"?>
<!--
The contents of this file are subject to the terms of the Common Development
and Distribution License (the License). You may not use this file except in
compliance with the License.

You can obtain a copy of the License at http://www.netbeans.org/cddl.html
or http://www.netbeans.org/cddl.txt.

When distributing Covered Code, include this CDDL Header Notice in each file
and include the License file at http://www.netbeans.org/cddl.txt.
If applicable, add the following below the CDDL Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"

The Original Software is NetBeans. The Initial Developer of the Original
Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
Microsystems, Inc. All Rights Reserved.
-->
<!DOCTYPE api-answers PUBLIC "-//NetBeans//DTD Arch Answers//EN" "../../nbbuild/antsrc/org/netbeans/nbbuild/Arch.dtd" [
  <!ENTITY api-questions SYSTEM "../../nbbuild/antsrc/org/netbeans/nbbuild/Arch-api-questions.xml">
]>

<api-answers
  question-version="1.12"
  module="NetBeans launcher &amp; bootstrap code"
  author="jglick@netbeans.org"
>

  &api-questions;


<!--
        <question id="arch-what">
            What is this project good for?
            <hint>
            Please provide here few lines describing the the project, 
            what problem it should solve, provide links to documentation, 
            specifications, etc.
            </hint>
        </question>
-->
    <answer id="arch-what">
        The NetBeans launcher starts the application. Different launchers are
        provided for different supported platforms - Unix/Linux, Windows, and
        others. There are also a handful of classes in the
        <code>org.netbeans</code> and <code>org.netbeans.core</code> packages
        which directly support early startup features, such as command-line
        options.
    </answer>



<!--
        <question id="compat-i18n">
            Is your module correctly internationalized?
            <hint>
            Correct internationalization means that it obeys instuctions 
            at <a href="http://www.netbeans.org/devhome/docs/i18n/index.html">
            NetBeans I18N pages</a>.
            </hint>
        </question>
-->
    <answer id="compat-i18n">
        Yes, except for early-startup code (including the native launcher) that
        deals with the command line.
    </answer>



<!--
        <question id="compat-standards">
            Does the module implement or define any standards? Is the 
            implementation exact or does it deviate somehow?
        </question>
-->
    <answer id="compat-standards">
        No.
    </answer>



<!--
        <question id="compat-version">
            Can your module coexist with earlier and future
            versions? Can you correctly read all old settings? Will future
            versions be able to read your current settings? Can you read
            or politely ignore settings stored by a future version?
            
            <hint>
            Very helpful for reading settings is to store version number
            there, so future versions can decide whether how to read/convert
            the settings and older versions can ignore the new ones.
            </hint>
        </question>
-->
    <answer id="compat-version">
        N/A
    </answer>



<!--
        <question id="dep-jre">
            Which version of JRE do you need (1.2, 1.3, 1.4, etc.)?
            <hint>
            It is expected that if your module runs on 1.x that it will run 
            on 1.x+1 if no, state that please. Also describe here cases where
            you run different code on different versions of JRE and why.
            </hint>
        </question>
-->
    <answer id="dep-jre">
        1.4 or later.
    </answer>



<!--
        <question id="dep-jrejdk">
            Do you require the JDK or is the JRE enough?
        </question>
-->
    <answer id="dep-jrejdk">
        The launcher itself does not use the JDK. The Unix and windows launchers permit
        either the JDK or JRE to be specified - if the JRE is specified, modules
        with hard dependencies on JDK tools (e.g. the JPDA Debugger module) will
        simply not be loaded. For other launchers, unknown.
    </answer>



<!--
        <question id="dep-nb">
            What other NetBeans projects does this one depend on?
            <hint>
            If you want, describe such projects as imported API using
            the <code>&lt;api name=&quot;identification&quot; type=&quot;import or export&quot; category=&quot;stable&quot; url=&quot;where is the description&quot; /></code>
            </hint>
        </question>
-->
    <answer id="dep-nb">
        <api category="official" group="java" name="FileSystems" type="import" url="@org-openide-filesystems@/overview-summary.html" />,
        <api category="official" group="java" name="Modules" type="import" url="@org-openide-modules@/overview-summary.html" />,
        <api category="official" group="java" name="Utilities" type="import" url="@org-openide-util@/overview-summary.html" />.
    </answer>



<!--
        <question id="dep-non-nb">
            What other projects outside NetBeans does this one depend on?
            
            <hint>
            Some non-NetBeans projects are packaged as NetBeans modules
            (see <a href="http://libs.netbeans.org">libraries</a>) and
            it is prefered to use this approach when more modules may
            depend on such third-party library.
            </hint>
        </question>
-->
    <answer id="dep-non-nb">
        None.
    </answer>



<!--
        <question id="dep-platform">
            On which platforms does your module run? Does it run in the same
            way on each?
            <hint>
            If your module is using JNI or deals with special differences of
            OSes like filesystems, etc. please describe here what they are.
            </hint>
        </question>
-->
    <answer id="dep-platform">
        <dl>
            <dt>Unix (incl. Linux)</dt>
            <dd>
                <p>
                    The <api 
                        category="stable" 
                        group="java.io.File" 
                        name="nbexec" 
                        type="export" 
                        url="http://platform.netbeans.org/articles/installation.html#launcher"
                    /> launcher is fully featured and
                    supported. It should work on any Unix flavor. Implemented as
                    a shell script. It can be influenced by some environment
                    variables. For example
                    <api category="private" group="property" name="TMPDIR" type="import" >
                        is read to indentify the place where a temporary file
                        with content of all environment variables is going to
                        be created.
                    </api>
                    This can be prevented by predefining
                    <api category="private" group="property" name="nbenvfile" type="export" >
                        to point to a file filled witout output of command like
                        <q>/usr/bin/env</q>, however this all is necessary only
                        on JDK 1.4, JDK 1.5 is using System.getenv() to access
                        all system variables.
                    </api>
                </p>
                <p>
                    <api 
                        category="private"
                        group="java.io.File"
                        name="lock-file"
                        type="export"
                    >
                    The lock file <samp>${netbeans.user}/lock</samp> will have file
                    permissions changed to <samp>go-rwx</samp> for safety on Unix
                    systems (requires presence of <code>chmod</code>)</api>
                </p>
            </dd>
            <dt>Windows (all variants?)</dt>
            <dd>
                <p>
                    The <api 
                        category="stable" 
                        group="java.io.File" 
                        name="nbexec.exe" 
                        type="export" 
                        url="http://platform.netbeans.org/articles/installation.html#launcher"
                    />
                    launcher is fully featured and
                    supported. <!-- <samp>runidew.exe</samp> is similar but avoids
                    showing a DOS console (this is recommended for most users). -->
                    Implemented using Visual C++; prebuilt binary is kept in CVS
                    along with sources.
                </p>
            </dd>
            <!-- Currently removed from the build:
            <dt>OS/2</dt>
            <dd>
                <p>
                    <samp>runideos2.cmd</samp> includes most relevant features.
                    Volunteer-supported. Batch script.
                </p>
            </dd>
            <dt>OpenVMS</dt>
            <dd>
                <p>
                    <samp>runideopenvms.com</samp> includes most relevant
                    features (plus some platform-specific additions) and is
                    supported by OpenVMS engineers at HP. Batch script.
                </p>
            </dd>
            <dt>Mac OS X</dt>
            <dd>
                <p>
                    <samp>macosx_launcher.dmg</samp> is probably fully featured
                    (TBD) and is optimized for the Mac OS X desktop over the Unix
                    launcher. Unofficially supported by Sun engineers.
                    Implemented in Objective C; prebuilt binary is kept in CVS
                    along with sources.
                </p>
            </dd>
            -->
        </dl>
    </answer>



<!--
        <question id="deploy-jar">
            Do you deploy just module JAR file(s) or other files as well?
            <hint>
            If your module consist just from one module JAR file, just confirm that.
            If it uses more than one JAR, describe where there are located, how
            they refer to each other. 
            If it consist of module JAR(s) and other files, please describe
            what is their purpose, why other files are necessary. Please 
            make sure that installation/deinstallation leaves the system 
            in state as it was before installation.
            </hint>
        </question>
-->
    <answer id="deploy-jar">
        Consists of various launcher scripts in the
        <samp>lib/</samp> directory of the NetBeans installation. Bootstrap Java
        code (part of core) resides in <samp>lib/boot.jar</samp> and
        <samp>core/core.jar</samp>.
    </answer>



<!--
        <question id="deploy-nbm">
            Can you deploy an NBM via the Update Center?
            <hint>
            If not why?
            </hint>
        </question>
-->
    <answer id="deploy-nbm">
        As part of core. But <a
        href="http://www.netbeans.org/issues/show_bug.cgi?id=24361">not on
        Windows</a>.
    </answer>



<!--
        <question id="deploy-packages">
            Are packages of your module made inaccessible by not declaring them
            public?
            
            <hint>
            NetBeans module system allows restriction of access rights to
            public classes of your module from other modules. This prevents
            unwanted dependencies of others on your code and should be used
            whenever possible (<a href="http://www.netbeans.org/download/apis/org/openide/doc-files/upgrade.html#3.4-public-packages">
            public packages
            </a>). 
            </hint>
        </question>
-->
    <answer id="deploy-packages">
        N/A for the launcher itself. For bootstrap code: no; the core execution
        engine (<samp>core-execution.jar</samp>) needs access to
        <code>org.netbeans.TopSecurityManager</code>.
        Modules may use <code>org.netbeans.CLIHandler</code> to add command-line
        option handling (currently used by <code>utilities</code>).
    </answer>



<!--
        <question id="deploy-shared">
            Do you need to be installed in the shared location only, or in the user directory only,
            or can your module be installed anywhere?
            <hint>
            Installation location shall not matter, if it does explain why.
            Consider also whether <code>InstalledFileLocator</code> can help.
            </hint>
        </question>
-->
    <answer id="deploy-shared">
        Shared location only, for obvious reasons.
    </answer>



<!--
        <question id="exec-classloader">
            Does your code create its own class loader(s)?
            <hint>
            A bit unusual. Please explain why and what for.
            </hint>
        </question>
-->
    <answer id="exec-classloader">
        <api name="ClassPath-Composition" category="private" group="java.io.File" type="export">
            Bootstrap code creates a class loader to load the rest of the core from.
            The bootstrap code is loaded from the Java application class loader,
            using the classpath <samp>lib/*.jar</samp>.
        </api>    
        <p/>
        
        <api name="Dynamic-ClassPath-Composition" category="friend" group="java.io.File" type="export" >
            After creating bootstrap classpath another low level set of JARs is loaded with a new
            classloader from <samp>core/*.jar</samp> directories in each clusters.
        </api>
    </answer>



<!--
        <question id="exec-component">
            Is execution of your code influenced by any (string) property
            of any of your components?
            
            <hint>
            Often <code>JComponent.getClientProperty</code>, <code>Action.getValue</code>
            or <code>PropertyDescriptor.getValue</code>, etc. are used to influence
            a behaviour of some code. This of course forms an interface that should
            be documented. Also if one depends on some interface that an object
            implements (<code>component instanceof Runnable</code>) that forms an
            API as well.
            </hint>
        </question>
-->
    <answer id="exec-component">
        No.
    </answer>



<!--
        <question id="exec-privateaccess">
            Are you aware of any other parts of the system calling some of 
            your methods by reflection?
            <hint>
            If so, describe the &quot;contract&quot; as an API. Likely private or friend one, but
            still API and consider rewrite of it.
            </hint>
        </question>
-->
    <answer id="exec-privateaccess">
        None known.
    </answer>



<!--
        <question id="exec-property">
            Is execution of your code influenced by any environment or
            Java system (<code>System.getProperty</code>) property?
            
            <hint>
            If there is a property that can change the behaviour of your 
            code, somebody will likely use it. You should describe what it does 
            and the stability category of this API. You may use
            <pre>
                &lt;property name=&quot;id&quot; category=&quot;private&quot; >
                    description of the property, where it is used, what it influence, etc.
                &lt;/property>            
            </pre>
            </hint>
        </question>
-->
    <answer id="exec-property">
        <ul>
            <li>
                <api type="import" group="property" name="JDK_HOME" category="standard">
                    Default JDK installation directory to use, unless
                    <samp>-jdkhome</samp> is given. [Unix only]
                </api>
            </li>
            <li>
                <api type="import" group="property" name="JAVA_PATH" category="standard">
                    Backup variable to check for JDK installation directory.
                    [Unix only]
                </api>
            </li>
            <li>
                <api type="import" group="property" name="NB_JDK_HOME" category="devel">
                    Overriding JDK installation directory specifically for
                    NetBeans. [Unix only]
                </api>
            </li>
            <li>
                <api type="import" group="property" name="JavaDevelopmentKit" category="standard">
                    The registry key <code>Software\JavaSoft\Java Development Kit</code> is the
                    default JDK installation directory to use, unless
                    <samp>-jdkhome</samp> is given. [Windows only]
                </api>
            </li>
            <li>
                <api type="export" group="property" name="netbeans.mainclass" category="friend">
                    Main Java class for bootstrap code to start (currently <code>org.netbeans.core.startup.Main</code>).
                    Might be used by alternate launchers.
                </api>
            </li>
            <li>
                <api type="export" group="property" name="NetBeans-IDE-Dev" category="private">
                    The registry key <code>Software\netbeans.org\NetBeans IDE\Dev</code>
                    Default user directory, unless <samp>-userdir</samp> is
                    given. The name of this registry key is brandable, as is its
                    default value. [Windows only]
                </api>
            </li>
            <li>
                <api type="export" group="property" name="netbeans.home" category="devel">
                    NetBeans installation directory (where the launcher is).
                </api>
            </li>
            <li>
                <api type="export" group="property" name="netbeans.user" category="devel">
                    NetBeans user directory.
                </api>
            </li>
            <li>
                <api type="export" group="property" name="netbeans.dirs" category="friend">
                    Additional secondary NetBeans installation directories, if <a
                    href="http://www.netbeans.org/issues/show_bug.cgi?id=27151">applicable</a>.
                </api>
            </li>
            <li>
                <api type="export" group="property" name="netbeans.system_http_proxy" category="devel">
                    System proxy setting in the format of hostname:port.  The
                    launcher does its best to detect the OS/desktop HTTP proxy
                    setting.  There is no guarantee that it succeeds.  The property
                    may not be set at all or its value may be totally wrong.
                </api>
            </li>
            <li>
                <api type="export" group="property" name="netbeans.system_http_non_proxy_hosts" category="devel">
                    List of addresses that are not accessed through proxy.  The
                    launcher attempts to detect the OS/desktop HTTP proxy
                    setting.  There is no guarantee that it succeeds.  The property
                    may not be set at all or its value may be totally wrong and 
                    its format is not defined.
                </api>
            </li>
            <li>
                <api type="export" group="property" name="netbeans.classpath" category="friend">
                    Classpath to prepend to core loader (normally just
                    <samp>lib/*.jar</samp>). Possibly useful for testing
                    infrastructure etc.
                </api>
            </li>
            <li>
                <api type="export" group="property" name="netbeans.osenv" category="private">
                    If set, path to a file containing all environment variables
                    known to the launcher, one per line (newline-terminated),
                    <samp>name=value</samp> format. Will be used to translate
                    environment variables into system properties. Launchers
                    should set this if they can. (Ignored under JDK 1.5+.)
                </api>
            </li>
            <li>
                <api type="export" group="property" name="netbeans.osenv.nullsep" category="private">
                    If <code>netbeans.osenv</code> is defined, this property if
                    <code>true</code> (default is <code>false</code>) says to use
                    ASCII NUL rather than NL for the separator between name/value
                    pairs. Permits values with embedded newlines, which seems to
                    be common on some Linux distributions at least. Launchers
                    should set this if they can. (Ignored under JDK 1.5+.)
                </api>
            </li>
            <li>
                <api type="export" group="property" name="org.netbeans.do_not_warn_default_package" category="private">
                    If <code>org.netbeans.do_not_warn_default_package</code> is defined
                    and set to true printing of warning messages about accessing resources
                    from the default package is supressed.
                </api>
            </li>
            <li>
                <api name="netbeans.importclass" category="friend" group="property" type="export" >
                    There is a special support for importing the settings from previous
                    versions. As only the product itself knows about what to import and
                    where this cannot be done directly in the launcher, but we need at 
                    a well defined moment (user directory is missing and no modules
                    have been initialized yet) to call the product to ask the user 
                    and do the actual copy of userdir. 
                    <p/>
                    After all <code>core/*.jar</code> files has been initialized
                    and the user dir has not yet been updated (see bellow) the 
                    launcher checks for value of <code>netbeans.importclass</code>
                    system property and if provided it loads that class and invokes
                    its main method (in AWT thread) and if no exception is thrown it 
                    marks the userdir as already upgraded.
                </api>
                <api name="imported-marker" category="friend" group="java.io.File" type="export">
                    <samp>${netbeans.user}/var/imported</samp> is used to identify whether a userdir has already been updated
                    or it still needs an update. Can be created by installer if no update
                    check should be performed, no other code is supposed to realy on 
                    this file.
                </api>
                <api name="netbeans.accept_license_class" category="friend" group="property" type="export" >
                    Before first usage of IDE user must accept license. If user does not install IDE
                    by installer (user must accept license during installation) user must accept license
                    during IDE first start.
                    <p>Launcher calls method <code>showLicensePanel</code> of <code>netbeans.acceptlicenseclass</code>
                    if license was not yet accepted by user and it is necessary to show license
                    in dialog to user.</p>
                </api>. 
                <api name="license-check-marker-file" category="friend" group="java.io.File" type="export">
                    <samp>${netbeans.user}/var/license_accepted</samp> and <samp>${nbcluster.dir}/var/license_accepted</samp>
                    are used to identify whether user accepted license.
                </api>
             </li>
            <li>
                <api type="export" group="property" name="netbeans.logger.console" category="friend">
                    <p>
                        Controls whether to log messages to the console, or just to the log file.
                    </p>
                </api>
            </li>
            <li>
                <api type="export" group="property" name="org.netbeans.CLIHandler" category="private">
                    <p>
                        Setting this property to less than zero value enables logging of what is
                        going on in the CLIHandler - e.g. in the code that locks user directory and
                        handles processing of command line options. Use <code>-J-Dorg.netbeans.CLIHandler=-1</code>
                        to send the logging to <code>System.err</code>.
                    </p>
                </api>
            </li>
            <li>
                <api type="export" group="property" name="org.netbeans.core.startup.specialResource" category="friend">
                    <p>
                        Contains comma separated list of package prefixes regarded as "special resource". Packages
                        that are special resource can be split among several jars. Otherwise it is not allowed
                        by the NetBeans module system to have one package present in more jars.
                    </p>
                </api>
            </li>
        </ul>
        <p>
            Additionally, the launcher in cooperation with the core makes all
            environment variables available to the Java virtual machine. For an
            environment variable <samp>FOO</samp> detected at launch time, a
            system property named <samp>Env-FOO</samp> is made available
            (case-sensitively), as well as <samp>env-foo</samp> (not
            case-sensitive). For JDK 1.5+, the core does this without the
            launcher's help, using <code>System.getenv()</code>.
            <api type="export" group="property" name="Env-FOO" category="friend">
                Case-sensitive value of environment variable <samp>FOO</samp>.
                <strong>No feature</strong> of a NetBeans module may strongly
                rely on such environment variables; but they may be used as
                defaults for configuration options which are also settable
                directly in the UI.
            </api>
            <api type="export" group="property" name="env-foo" category="friend">
                Case-insensitive value of the environment variable
                <samp>FOO</samp>. See warning as per <samp>Env-FOO</samp>.
            </api>
        </p>
        <p>
            There are also some options passed to the launcher (interpreted
            either by the script itself, or by early startup Java code).
            Options parsed by plugins using <code>org.netbeans.CLIHandler</code>
            (e.g. <samp>-open&#160;<i>FILE</i></samp>) are not included in this list:
        </p>
        <ul>
            <li>
                <api type="export" group="cli" name="--jdkhome" category="devel">
                    JDK (or perhaps JRE) installation directory.
                </api>
            </li>
            <li>
                <api type="export" group="cli" name="--clusters" category="devel">
                    The list of clusters to intialize the system from. Is
                    used to set the value of <code>netbeans.dirs</code>.
                </api>
            </li>
            <li>
                <api type="export" group="cli" name="--userdir" category="devel">
                    User directory, if not the default.
                </api>
            </li>
            <li>
                <api type="export" group="cli" name="-JWHATEVER" category="devel">
                    Pass option <samp>WHATEVER</samp> to the JVM.
                </api>
            </li>
            <li>
                <api type="export" group="cli" name="--cp" category="devel">
                    <samp>-cp:a</samp> and <samp>-cp:p</samp> append and prepend
                    to the startup classpath; deprecated except for special
                    purposes such as installing a custom look &amp; feel.
                </api>
            </li>
            <li>
                <api type="export" group="cli" name="--ui" category="devel">
                    Specify a look &amp; feel.
                </api>
            </li>
            <li>
                <api type="export" group="cli" name="--bootclass" category="devel">
                    Alternative main class used to initialize the system.
                </api>
            </li>
            <li>
                <api type="export" group="cli" name="-fontsize" category="deprecated">
                    Specify base fontsize. Deprecated in favor of using <a
                    href="http://ui.netbeans.org/docs/ui/themes/themes.html">themes</a>
                    which is much more general. But this is a convenient quick
                    settings, handy for projection screens and so on.
                </api>
            </li>
            <li>
                <api type="export" group="cli" name="-locale" category="devel">
                    Specify system locale.
                </api>
            </li>
            <li>
                <api type="export" group="cli" name="--branding" category="devel">
                    Specify application branding.
                </api>
            </li>
            <li>
                <api type="export" group="cli" name="-nologging" category="private">
                    Do not write a log file.
                </api>
            </li>
            <li>
                <api type="export" group="cli" name="-nosplash" category="friend">
                    Do not show the splash screen.
                </api>
            </li>
            <li>
                <api type="export" group="cli" name="-nogui" category="friend">
                    Do not show any GUI at all.
                </api>
            </li>
            <li>
                <api type="export" group="cli" name="--reload" category="devel">
                    Reload a test module.
                </api>
            </li>
        </ul>
    </answer>



<!--
        <question id="exec-reflection">
            Does your code use Java Reflection to execute other code?
            <hint>
            This usually indicates a missing or unsufficient API in the other
            part of the system. If the other side is not aware of your dependency
            this contract can be easily broken.
            </hint>
        </question>
-->
    <answer id="exec-reflection">
        The bootstrap code of course uses reflection to start the normal core.
        Currently some reflection is used in bootstrap class loaders to work
        around a variety of JRE bugs in handling loading from JAR files,
        especially on Windows which has mandatory file locking - the JRE code to
        load from JARs is rather buggy when it comes to changing or removing the
        JAR during the JVM session.
    </answer>



<!--
        <question id="format-clipboard">
            Which data flavors (if any) does your code read from or insert to
            the clipboard?
        </question>
-->
    <answer id="format-clipboard">
        N/A
    </answer>



<!--
        <question id="format-dnd">
            Which protocols (if any) does your code understand during Drag &amp; Drop?
        </question>
-->
    <answer id="format-dnd">
        N/A
    </answer>



<!--
        <question id="format-types">
            Which file formats (if any) does your code read or write on disk?
        </question>
-->
    <answer id="format-types">
        The <samp>bin/ide.cfg</samp> (or <samp>~/ide.cfg</samp>, Unix only)
        configuration file is read if present. This consists of zero or more
        valid launcher options, separated by spaces and/or newlines.
    </answer>



<!--
        <question id="lookup-lookup">
            Does your module use <code>org.openide.util.Lookup</code>
            to find any components to communicate with? Which ones?
            
            <hint>
            Please describe the interfaces you are searching for, where 
            are defined, whether you are searching for just one or more of them,
            if the order is important, etc. Also clasify the stability of such
            API contract.
            </hint>
        </question>
-->
    <answer id="lookup-lookup">
        <api name="org.netbeans.CLIHandler" type="export" category="friend" group="lookup">
            <p>
                Instances of <code>org.netbeans.CLIHandler</code> are found using
                services lookup in the "dynamic classpath loader" (i.e. startup
                classpath plus <samp>${netbeans.home}/core/*.jar</samp>).
            </p>
        </api>

        <api name="org.netbeans.ModuleFactory" type="export" category="friend" group="lookup">
            <p>
                Instances of <code>org.netbeans.ModuleFactory</code> are found using
                services lookup in the "dynamic classpath loader" (i.e. startup
                classpath plus <samp>${netbeans.home}/core/*.jar</samp>). ModuleFactory
                can be used to create alternative module implementations.
            </p>
        </api>
        
        <api name="CoreBridge" type="export" category="private" group="lookup" >
            <p>
                The communication between <code>core.jar</code> and rest of the platform code
                in <code>org-netbeans-core.jar</code> is handled thru 
                handled thru <code>CoreBridge</code> calls.
            </p>
        </api>
        
        <api name="RunLevel" type="export" category="friend" group="lookup" >
            <p>
                Additional callbacks from <code>core.jar</code> after the module system is started
                are done using <code>RunLevel</code> interface. Currently it starts window system.
            </p>
        </api>
    </answer>



<!--
        <question id="lookup-register">
            Do you register anything into lookup for other code to find?
            <hint>
            Do you register using layer file or using <code>META-INF/services</code>?
            Who is supposed to find your component?
            </hint>
        </question>
-->
    <answer id="lookup-register">
        No.
    </answer>



<!--
        <question id="lookup-remove">
            Do you remove entries of other modules from lookup?
            <hint>
            Why? Of course, that is possible, but it can be dangerous. Is the module
            your are masking resource from aware of what you are doing?
            </hint>
        </question>
-->
    <answer id="lookup-remove">
        No.
    </answer>



<!--
        <question id="perf-exit">
            Does your module run any code on exit?
        </question>
-->
    <answer id="perf-exit">
        When the launcher finds that the JVM has exited, it may run
        <samp>core/updater.jar</samp> if there are available NBM updates
        downloaded.
    </answer>



<!--
        <question id="perf-huge_dialogs">
            Does your module contain any dialogs or wizards with a large number of
            GUI controls such as combo boxes, lists, trees, or text areas?
        </question>
-->
    <answer id="perf-huge_dialogs">
        No.
    </answer>



<!--
        <question id="perf-limit">
            Are there any hardcoded or practical limits in the number or size of
            elements your code can handle?
        </question>
-->
    <answer id="perf-limit">
        No.
    </answer>



<!--
        <question id="perf-mem">
            How much memory does your component consume? Estimate
            with a relation to the number of windows, etc.
        </question>
-->
    <answer id="perf-mem">
        Trivial.
    </answer>



<!--
        <question id="perf-menus">
            Does your module use dynamically updated context menus, or
            context-sensitive actions with complicated enablement logic?
        </question>
-->
    <answer id="perf-menus">
        No.
    </answer>



<!--
        <question id="perf-progress">
            Does your module execute any long-running tasks?
            <hint>Typically they are tasks like connecting over
            network, computing huge amount of data, compilation.
            Such communication should be done asynchronously (for example
            using <code>RequestProcessor</code>), definitively it should 
            not block AWT thread.
            </hint>
        </question>
-->
    <answer id="perf-progress">
        N/A
    </answer>



<!--
        <question id="perf-scale">
            Which external criteria influence the performance of your
            program (size of file in editor, number of files in menu, 
            in source directory, etc.) and how well your code scales?
            Please include some estimates.
        </question>
-->
    <answer id="perf-scale">
        N/A
    </answer>



<!--
        <question id="perf-startup">
            Does your module run any code on startup?
        </question>
-->
    <answer id="perf-startup">
        Of course - NetBeans!
    </answer>



<!--
        <question id="perf-wakeup">
            Does any piece of your code wake up periodically and do something
            even when the system is otherwise idle (no user interaction)?
        </question>
-->
    <answer id="perf-wakeup">
        No.
    </answer>



<!--
        <question id="resources-file">
            Does your module use <code>java.io.File</code> directly?
            
            <hint>
            NetBeans provide a logical wrapper over plain files called 
            <code>org.openide.filesystems.FileObject</code> that
            provides uniform access to such resources and is the prefered
            way that should be used. But of course there can be situations when
            this is not suitable.
            </hint>
        </question>
-->
    <answer id="resources-file">
        Yes, it must. The Filesystems API has not been loaded when it runs.
    </answer>



<!--
        <question id="resources-layer">
            Does your module provide own layer? Does it create any files or
            folders in it? What it is trying to communicate by that and with which 
            components?
            
            <hint>
            NetBeans allows automatic and declarative installation of resources 
            by module layers. Module register files into appropriate places
            and other components use that information to perform their task
            (build menu, toolbar, window layout, list of templates, set of
            options, etc.). 
            </hint>
        </question>
-->
    <answer id="resources-layer">
        No.
    </answer>



<!--
        <question id="resources-mask">
            Does your module mask/hide/override any resources provided by other modules in
            their layers?
            
            <hint>
            If you mask a file provided by another module, you probably depend
            on that and do not want the other module to (for example) change
            the file's name. That module shall thus make that file available as an API
            of some stability category.
            </hint>
        </question>
-->
    <answer id="resources-mask">
        No.
    </answer>



<!--
        <question id="resources-read">
            Does your module read any resources from layers? For what purpose?
            
            <hint>
            As this is some kind of intermodule dependency, it is a kind of API.
            Please describe it and clasify according to 
            <a href="http://openide.netbeans.org/tutorial/api-design.html#categories">
            common stability categories</a>.
            </hint>
        </question>
-->
    <answer id="resources-read">
        No.
    </answer>

<!--
        <question id="exec-introspection">
            Does your module use any kind of runtime type information (<code>instanceof</code>,
            work with <code>java.lang.Class</code>, etc.)?
            <hint>
            Check for cases when you have an object of type A and you also
            expect it to (possibly) be of type B and do some special action. That
            should be documented. The same applies on operations in meta-level
            (Class.isInstance(...), Class.isAssignableFrom(...), etc.).
            </hint>
        </question>
-->
    <answer id="exec-introspection">
        <code>ProxyClassLoader</code> (the general NetBeans class loader which
        loads all of core and modules) checks to see if its parent loaders
        include instances of <code>ProxyClassLoader</code>, in which case it
        delegates to them differently. This is necessary due to the design of
        that loader.
    </answer>



<!--
        <question id="exec-process">
            Do you execute an external process from your module? How do you ensure
            that the result is the same on different platforms? Do you parse output?
            Do you depend on result code?
            <hint>
            If you feed an input, parse the output please declare that as an API.
            </hint>
        </question>
-->
    <answer id="exec-process">
        No, except for the updater tool (part of Auto Update, q.v.).
        <code>chmod</code> is run if available to disable read access for other users
        to <samp>${netbeans.user}/lock</samp>; no output is parsed but the result
        code is checked (if the executable in fact exists).
    </answer>

</api-answers>
