<!-- <questionid="arch-overall"when="init"> Describetheoverallarchitecture. <hint> WhatwillbeAPIfor <ahref="http://openide.netbeans.org/tutorial/api-design.html#design.apiandspi"> clientsandwhatsupportAPI</a>? Whatpartswillbepluggable? Howwillplug-insberegistered?Pleaseuse<code><apitype="export"/></code> todescribeyourgeneralAPIsandspecifytheir <ahref="http://openide.netbeans.org/tutorial/api-design.html#category-private"> stabilitycategories</a>. Ifpossiblepleaseprovidesimplediagrams. </hint> </question>
-->
<answer id="arch-overall">
<p>
Currently the module doesn't provide any SPI.
</p>
<p>
Three main API classes are:
<a href="@TOP@/org/netbeans/modules/nativeexecution/api/ExecutionEnvironment.html">ExecutionEnvironment</a>,
<a href="@TOP@/org/netbeans/modules/nativeexecution/api/NativeProcess.html">NativeProcess</a> and
<a href="@TOP@/org/netbeans/modules/nativeexecution/api/NativeProcessBuilder.html">NativeProcessBuilder</a>.
ExecutionEnvironmant describes <b>where</b> the process needs to be
started (i.e. it identifies a host and, if needed, provides information
for establishing ssh connection with that host (i.e. username and
ssh-port to use)).
<a href="@TOP@/org/netbeans/modules/nativeexecution/api/util/ConnectionManager.html">ConnectionManager</a>
(that is also a part of the API)
handles all ssh connections and is responsible for establishing those
connection (ask for passwords, etc.)<br/>
NativeProcessBuilder is a factory for a NativeProcess that can be
used with an ExecutionService to create and start system process.
</p>
</answer>
<!-- <questionid="arch-quality"when="init"> Howwillthe<ahref="http://www.netbeans.org/community/guidelines/q-evangelism.html">quality</a> ofyourcodebetestedand howarefutureregressionsgoingtobeprevented? <hint> Whatkindoftestingdo youwanttouse?Howmuchfunctionality,inwhichareas, shouldbecoveredbythetests?Howyoufindoutthatyour projectwassuccessful? </hint> </question>
-->
<answer id="arch-quality">
<p>
Most of the API functionality is covered by unit tests. Same applies to future enhancements.
</p>
</answer>
<!-- <questionid="arch-time"when="init"> Whatarethetimeestimatesofthework? <hint> Pleaseexpressyourestimatesofhowlongthedesign,implementation, stabilizationarelikelytolast.Howmanypeoplewillbeneededto implementthisandwhatistheexpectedmilestonebywhichtheworkshouldbe ready? </hint> </question>
-->
<answer id="arch-time">
<p>
It is not final yet.
</p>
</answer>
Describethemain<ahref="http://openide.netbeans.org/tutorial/api-design.html#usecase"> usecases</a>ofthenewAPI.Whowilluseitunder whatcircumstances?Whatkindofcodewouldtypicallyneedtobewritten tousethemodule? </question>
-->
<answer id="arch-usecases">
<p>
The module was designed in the same manner as ExtExecution Support and can be
considered as an extension of that module. It introduces it's own ProcessBuilder
(NativeProcessBuilder) that can be used with an
<a href="@org-netbeans-modules-extexecution@/org/netbeans/api/extexecution/ExecutionDescriptor.html">ExecutionDescriptor</a>
and an
<a href="@org-netbeans-modules-extexecution@/org/netbeans/api/extexecution/ExecutionService.html">ExecutionService</a>
from the ExtExecution Support Module. The NativeProcessBuilder
is a factory for a NativeProcess, which is an extension of java.lang.Process with
two additional methods: getPID() and getState() to receive system process' pid
and state respectively.
</p>
<p>
Below are several examples of usage.
</p>
<usecase id="StartRemoteProcess" name="Start Remote System Process">
<pre>
ExecutionEnvironment env = ExecutionEnvironmentFactory.createNew(userName, host);
NativeProcessBuilder npb = new NativeProcessBuilder(env, "/bin/ls");
npb = npb.setArguments(".").setWorkingDirectory("/tmp");
ExecutionDescriptor descr = new ExecutionDescriptor().controllable(true);
ExecutionService service = ExecutionService.newService(npb, descr, "test");
System.out.println("Exit code is " + exitCode);
</pre>
</usecase>
<usecase id="ObtainPID" name="Obtain System Process' ID (PID)">
To obtain process' PID one should register it's ChangeListener when configure a
NativeProcessBuilder that will recieve a notification about process start event
(<i>State</i> of the process changed to <i><b>RUNNING</b></i>). Then, on this
event it is possible to ask event's source (NativeProcess) for a PID.
<pre>
ChangeListener listener = new ChangeListener() {
public void stateChanged(ChangeEvent e) {
NativeProcess process = (NativeProcess) e.getSource();
State newState = process.getState();
if (newState == State.STARTING) {
return;
}
if (newState == State.ERROR) {
System.out.println("Unable to start process!");
return;
}
<usecase id="StartInExtTerm" name="Start Process in an External Terminal">
To start process in an external terminal one should setup NativeProcessBuilder
accordingly.
<pre>
...
ExternalTerminal term = ExternalTerminalProvider.getTerminal("gnome-terminal").setTitle("My title");
<usecase id="UseAsynchronousActions" name="Initiate Connect/Privileges Grant">
<a href="@TOP@/org/netbeans/modules/nativeexecution/api/util/ConnectionManager.html">ConnectionManager</a> and
<a href="@TOP@/org/netbeans/modules/nativeexecution/api/util/SolarisPrivilegesSupport.html">SolarisPrivilegesSupport</a>
are utility classes that manage
remote sessions and granding privileges to execution environment.<br/>
Their usage is rather straightforward, but they both have one characteristics
and implement the following pattern: to initiate connection/granting privileges
one first obtains an
<a href="@TOP@/org/netbeans/modules/nativeexecution/api/util/AsynchronousAction.html">AsynchronousAction</a>
and then invokes it (or associate with
some Action handler).
<pre>
ExecutionEnvironment ee = ExecutionEnvironmentFactory.createNew(user, host, port);
ConnectionManager cm = ConnectionManager.getInstance();
Runnable onConnect = new Runnable() { public void run() {
DialogDisplayer.getDefault().notify(new DialogDescriptor.Message("Host connected!"));
}
};
...
JPanel panel = new JPanel(new BorderLayout());
panel.add(new JButton(connectAction), BorderLayout.CENTER);
DialogDisplayer.getDefault().createDialog(
new DialogDescriptor(panel, "Connection Test")).setVisible(true);
...
</pre>
</usecase>
</answer>
<!-- <questionid="arch-what"when="init"> Whatisthisprojectgoodfor? <hint> Pleaseprovidehereafewlinesdescribingtheproject, whatproblemitshouldsolve,providelinkstodocumentation, specifications,etc. </hint> </question>
-->
<answer id="arch-what">
<p>
This module can be considered as an extension to the External Execution
Module that provides an API (<api name="NativeExecutionAPI" group="java" type="export" category="devel"/>) to execute and control external system
processes not only on the local machine, but on remote systems as well.
As it uses External Execution Module as a base for execution control,
process' Input/Output and integration with the IDE are handled in the same
way.
</p>
The differences are:
<ul>
<li>one can start process remotely (using ssh-connection);</li>
<li>it supports execution in an external terminal;</li>
<li>it is possible to obtain system process' ID (PID);</li>
<li>it provides utility classes to perform common tasks like
files uploading, removing, etc.;
</li>
<li>it provides utility class for granting execution privileges
to native processes (See privileges(5). Solaris 10+ only).
</li>
</ul>
<!-- <questionid="compat-deprecation"when="init"> Howtheintroductionofyourprojectinfluencesfunctionality providedbypreviousversionoftheproduct? <hint> Ifyouareplanningtodeprecate/remove/changeanyexistingAPIs, listthemhereaccompaniedwiththereasonexplainingwhyyou aredoingso. </hint> </question>
-->
<answer id="compat-deprecation">
<p>
This module in an extension rather than deprecation of External
Execution Support.
</p>
</answer>
<hint> Veryhelpfulforreadingsettingsistostoreversionnumber there,sofutureversionscandecidewhetherhowtoread/convert thesettingsandolderversionscanignorethenewones. </hint> </question>
-->
<answer id="compat-version">
<p>
The only settings this module stores is an encrypted user password (if
he/she agreed to do so)... It is not planned to change the format of
these settings in future...
</p>
</answer>
<!-- <questionid="dep-jre"when="final"> WhichversionofJREdoyouneed(1.2,1.3,1.4,etc.)? <hint> Itisexpectedthatifyourmodulerunson1.xthatitwillrun on1.x+1ifno,statethatplease.Alsodescribeherecaseswhere yourundifferentcodeondifferentversionsofJREandwhy. </hint> </question>
-->
<answer id="dep-jre">
<p>
This module was developed using JDK 1.5
</p>
</answer>
<!-- <questionid="dep-platform"when="init"> Onwhichplatformsdoesyourmodulerun?Doesitruninthesame wayoneach? <hint> IfyouplananydependencyonOSoranyusageofnativecode, pleasedescribewhyyouaredoingsoanddescribehowyouenvision toenforcetheportabilityofyourcode. Pleasenotethatthereisasupportfor<ahref="http://www.netbeans.org/download/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html#how-os-specific">OSconditionally enabledmodules</a>whichtogetherwithautoload/eagermodules canallowyoutoenabletoprovidethebestOSawaresupport oncertainOSeswhileprovidingcompatibilitybridgeonthenot supportedones. Alsopleaselistthesupported OSes/HWplatformsandmentionedthelovestversionofJDKrequired foryourprojecttorunon.AlsostatewhetherJREisenoughor youreallyneedJDK. </hint> </question>
-->
<answer id="dep-platform">
<p>
The module was written to support DLight functionality, so the focus
was Solaris/Linux environment. It was not tested under other environments.
For remote execution it is required that remote host is running ssh
server. For privileged execution it is required that remote host runs Solaris 10+.
For privileged support a small native executable is implemented and used.
For terminal support a shell script (wrapper) is used.
</p>
</answer>
IfitusesmorethanoneJAR,describewheretheyarelocated,how theyrefertoeachother. IfitconsistofmoduleJAR(s)andotherfiles,pleasedescribe whatistheirpurpose,whyotherfilesarenecessary.Please makesurethatinstallation/uninstallationleavesthesystem instateasitwasbeforeinstallation. </hint> </question>
-->
<answer id="deploy-jar">
<p>
jar with this module + jar with jsch + native executable for privileged
execxution
</p>
</answer>
<!-- <questionid="deploy-nbm"when="impl"> CanyoudeployanNBMviatheUpdateCenter? <hint> Ifnotwhy? </hint> </question>
-->
<answer id="deploy-nbm">
<p>
Not yet. It is not final yet.
</p>
</answer>
<hint> Often<code>JComponent.getClientProperty</code>,<code>Action.getValue</code> or<code>PropertyDescriptor.getValue</code>,etc.areusedtoinfluence abehaviorofsomecode.Thisofcourseformsaninterfacethatshould bedocumented.Alsoifonedependsonsomeinterfacethatanobject implements(<code>componentinstanceofRunnable</code>)thatformsan APIaswell. </hint> </question>
-->
<answer id="exec-component">
<p>
There are no public properties. There are some for debugging purposes.
</p>
</answer>
<!-- <questionid="exec-process"when="impl"> Doyouexecuteanexternalprocessfromyourmodule?Howdoyouensure thattheresultisthesameondifferentplatforms?Doyouparseoutput? Doyoudependonresultcode? <hint> Ifyoufeedaninput,parsetheoutputpleasedeclarethatasanAPI. </hint> </question>
-->
<answer id="exec-process">
<p>
Yes. The API provides support to do so. The result code, input and output
stream content does not define API as this is forwarded to the client of this module.
</p>
</answer>
<!-- <questionid="exec-property"when="impl"> Isexecutionofyourcodeinfluencedbyanyenvironmentor Javasystem(<code>System.getProperty</code>)property? Onasimilarnote,istheresomethinginterestingthatyou passto<code>java.util.logging.Logger</code>?Ordoyouobserve whatotherslog? <hint> Ifthereisapropertythatcanchangethebehaviorofyour code,somebodywilllikelyuseit.Youshoulddescribewhatitdoes andthe<ahref="http://openide.netbeans.org/tutorial/api-design.html#life">stabilitycategory</a> ofthisAPI.Youmayuse <pre> <apitype="export"group="property"name="id"category="private"url="http://..."> descriptionoftheproperty,whereitisused,whatitinfluence,etc. </api> </pre> </hint> </question>
-->
<answer id="exec-property">
<p>
None of them are 'public'. There are several properties that are used in
debugging purposes.
</p>
</answer>
<!-- <questionid="exec-threading"when="init"> Whatthreadingmodels,ifany,doesyourmoduleadhereto?Howthe projectbehaveswithrespecttothreading? <hint> IsyourAPIthreadsafe?Canitbeaccessedfromanythreadsor justfromsomededicatedones?AnyspecialrelationtoAWTand itsEventDispatchthread?Also ifyourmodulecallsforeignAPIswhichhaveaspecificthreadingmodel, indicatehowyoucomplywiththerequirementsformultithreadedaccess (synchronization,mutexes,etc.)applicabletothoseAPIs. IfyourmoduledefinesanyAPIs,orhascomplexinternalstructures thatmightbeusedfrommultiplethreads,declarehowyouprotect dataagainstconcurrentaccess,raceconditions,deadlocks,etc., andwhethersuchrulesareenforcedbyruntimewarnings,errors,assertions,etc. Examples:aclassmightbenon-thread-safe(likeJavaCollections);might befullythread-safe(internallocking);mightrequireaccessthroughamutex (andmayormaynotautomaticallyacquirethatmutexonbehalfofaclientmethod); mightbeabletorunonlyintheeventqueue;etc. Alsodescribewhenanyeventsarefired:synchronously,asynchronously,etc. Ideas:<ahref="http://core.netbeans.org/proposals/threading/index.html#recommendations">ThreadingRecommendations</a>(inprogress) </hint> </question>
-->
<answer id="exec-threading">
<p>
It is supposed to be thread safe and can be accessed from any thread.
</p>
</answer>
<!-- <questionid="perf-exit"when="final"> Doesyourmodulerunanycodeonexit? </question>
-->
<answer id="perf-exit">
<p>
On JVM shutdown module tries to terminate any running process executed through the API.
</p>
</answer>
<!-- <questionid="perf-huge_dialogs"when="final"> Doesyourmodulecontainanydialogsorwizardswithalargenumberof GUIcontrolssuchascomboboxes,lists,trees,ortextareas? </question>
-->
<answer id="perf-huge_dialogs">
<p>
There are two dialogs: one to ask user password to connect to a host (in
case of remote execution); another one - to ask for priveleged user's
password to grant execution privileges for running process.
</p>
</answer>
<!-- <questionid="perf-limit"when="init"> Arethereanyhard-codedorpracticallimitsinthenumberorsizeof elementsyourcodecanhandle? <hint> Mostofalgorithmshaveincreasingmemoryandspeedcomplexity withrespecttosizeofdatatheyoperateon.Whatisthecritical partofyourprojectthatcanbeseenasabottleneckwith respecttospeedorrequiredmemory?Whatarethepractical sizesofdatayoutestedyourprojectwith?Whatisyourestimate ofpotentialsizeofdatathatwouldcausevisibleperformance problems?Istheresomekindofchecktodetectsuchsituation andprevent"hard"crashes-forexampletheCloneableEditorSupport checksforsizeofafiletobeopenedineditor andifitislargerthan1Mbitshowsadialoggivingthe usertherighttodecide-e.g.tocancelorcommitsuicide. </hint> </question>
-->
<answer id="perf-limit">
<p>
On very intensive output of spawned process, the performance may be affected.
Currently no any check of this is implemented.
</p>
</answer>
<!-- <questionid="perf-mem"when="final"> Howmuchmemorydoesyourcomponentconsume?Estimate witharelationtothenumberofwindows,etc. </question>
-->
<answer id="perf-mem">
<p>
Current implementation provides means for redirecting process' output/error
to a IOTab/StringBuffer... Depending on output, this may consume significant
amount of memory...
</p>
</answer>
<hint>Longrunningtasksshouldneverblock AWTthreadasitbadlyhurtstheUI <ahref="http://performance.netbeans.org/responsiveness/issues.html"> responsiveness</a>. Taskslikeconnectingover network,computinghugeamountofdata,compilation bedoneasynchronously(forexample using<code>RequestProcessor</code>),definitivelyitshould notblockAWTthread. </hint> </question>
-->
<answer id="perf-progress">
<p>
Processes that executed via provided API can take long time. Also for remote
execution connection to an other host(s) is initiated. All these tasks are
performed in non-AWT thread.
</p>
</answer>
<!-- <questionid="perf-scale"when="init"> Whichexternalcriteriainfluencetheperformanceofyour program(sizeoffileineditor,numberoffilesinmenu, insourcedirectory,etc.)andhowwellyourcodescales? <hint> Pleaseincludesomeestimates,thereareothermoredetailed questionstoanswerinlaterphasesofimplementation. </hint> </question>
-->
<answer id="perf-scale">
<p>
Number of threads depending on number of spawned processes (n) increases lineary.
</p>
</answer>
<!-- <questionid="perf-spi"when="init"> Howtheperformanceofthepluggedincodewillbeenforced? <hint> Ifyouallowforeigncodetobepluggedintoyourownmodule,how doyouenforcethatitwillbehavecorrectlyandquicklyandwillnot negativelyinfluencetheperformanceofyourownmodule? </hint> </question>
-->
<answer id="perf-spi">
<p>
No SPI way to plug in foreign code.
</p>
</answer>
<hint> NetBeansallowsautomaticanddeclarativeinstallationofresources bymodulelayers.Moduleregisterfilesintoappropriateplaces andothercomponentsusethatinformationtoperformtheirtask (buildmenu,toolbar,windowlayout,listoftemplates,setof options,etc.). </hint> </question>
-->
<answer id="resources-layer">
<p>
Yes. Terminal support is implemented so that it reads different terminals 'configuration' from the NativeExecution/ExtTerminalSupport folder.
Terminal 'configurations' describe what options should be passed to a
specific terminal (gnome-terminal, xterm) in order to start a process from
within it.
</p>
</answer>
<!-- <questionid="security-policy"when="final"> Doesyourfunctionalityrequiremodificationstothestandardpolicyfile? <hint>Yourcodemightpasscontroltothird-partycodenot comingfromtrusteddomains.Thiscouldbecodedownloadedoverthe networkorcodecomingfromlibrariesthatarenotbundled withNetBeans.Whichpermissionsneedtobegrantedtowhichdomains?</hint> </question>
-->
<answer id="security-policy">
<p>
This module uses JSch library (<a href="http://www.jcraft.com/jsch/">jsch</a>)
This library has already been used in, for example, C/C++ Support Module
</p>
</answer>
</api-answers>
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.35Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-09-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.