bug fix 14901: WScilex.exe stops immediately when launched from Java
[scilab.git] / scilab / modules / core / help / pt_BR / scilab.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
3         xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml"
4         xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
5         xmlns:scilab="http://www.scilab.org" xml:id="scilab" xml:lang="pt">
6     <refnamediv xml:id="wscilex">
7     </refnamediv>
8     <refnamediv xml:id="scilex">
9     </refnamediv>
10     <refnamediv>
11         <refname>scilex | scilab</refname>
12         <refpurpose>principal script para executar o Scilab e ferramentas de miscelânea
13         </refpurpose>
14     </refnamediv>
15     <refsynopsisdiv>
16         <title>Sqeüência de Chamamento</title>
17         <synopsis>
18 #      MS Windows          |  # Linux / Unix / Mac OS X
19 wscilex     &lt;Options&gt;     |  scilab         &lt;Options&gt;
20 wscilex-cli &lt;Options&gt; |  scilab-adv-cli &lt;Options&gt;
21 scilex      &lt;Options&gt;      |  scilab-cli     &lt;Options&gt;
22         </synopsis>
23     </refsynopsisdiv>
24     <refsection role="arguments">
25         <title>Parâmetros</title>
26         <variablelist>
27             <varlistentry>
28                 <term>-args arg#1 arg#2 ..</term>
29                 <listitem>
30                     <para>
31                         This option allows to send some data to the Scilab session:
32                         <itemizedlist>
33                             <listitem>Consecutive data are separated by one or several spaces.
34                             </listitem>
35                             <listitem>An expression between double-quotes is a single data.
36                             </listitem>
37                             <listitem>To include a double-quote in a data, write <literal>\"</literal> instead of <literal>"</literal>.
38                             </listitem>
39                             <listitem>The single quote <literal>'</literal> is a regular character. It has no special meaning.
40                             </listitem>
41                         </itemizedlist>
42                     </para>
43                     <para>
44                       Inside the opened session, these data can be retrieved as separated strings with <link linkend="sciargs">sciargs()</link>.
45                      </para>
46                      <para>
47                       Example:
48                         <screen><![CDATA[C:\Users\Me> scilex -nb -args "Hello \"%USERNAME%\"" 1.2345 \"%cd%\"]]></screen>
49                         <programlisting><![CDATA[
50 // Inside the opened session:
51 a = sciargs()
52 i = find(a=="-args")
53 a(i+1)
54 evstr(a(i+2))*2
55 "This session has been launched from " + a(i+3)
56                         ]]>
57                         </programlisting>
58                         <screen><![CDATA[
59 --> // Inside the opened session:
60 --> a = sciargs()
61  a  =
62 !c:\SCIdir\bin\scilex  -nw  -nb  -noatomsautoload  -args  Hello "John"  1.2345  "C:\Users\Me" !
63
64 --> i = find(a=="-args")
65  i  =
66     5.
67
68 --> a(i+1)
69  ans  =
70  Hello "John"
71
72 --> evstr(a(i+2))*2
73  ans  =
74     2.469
75
76 --> "This session has been launched from " + a(i+3)
77  ans  =
78  This session has been launched from "C:\Users\Me"
79
80 -->
81 ]]></screen>
82                      </para>
83                      <para>
84                      <note>Using <literal>-args</literal> as the <emphasis role="italic">last</emphasis> command line option is safer.
85                      </note>
86                      </para>
87                 </listitem>
88             </varlistentry>
89             <varlistentry>
90                 <term>-display Display</term>
91                 <listitem>
92                     <para>Para uso apenas em sistemas Xwindow para ajustar um display de
93                         servidor X. O display padrão é unix:0.0
94                     </para>
95                     <para>
96                         <literal>-display</literal> pode ser abreviado por
97                         <literal>-d</literal>
98                     </para>
99                 </listitem>
100             </varlistentry>
101             <varlistentry>
102                 <term>-e Instructions</term>
103                 <listitem>
104                     <para>
105                         No final de toda a sessão de inicialização, esta opção
106                         <itemizedlist>
107                             <listitem>
108                                 <para>Define o diretório de trabalho atual para o diretório shell do qual o Scilab foi lançado. Por favor veja o exemplo dado aqui-abaixo para a opção <literal> -f </literal>. Então,
109                                 </para>
110                             </listitem>
111                             <listitem>
112                                 <para>executa dado Scilab <literal>Instructions</literal>. Exemplo :
113                                     <screen><![CDATA[ scilab-cli -e  "disp(\"Hello\"); a=%pi+%i; disp(exp(a)); exit;" -nb]]></screen>
114                                 </para>
115                             </listitem>
116                         </itemizedlist>
117                     </para>
118                     <warning>
119                         As opções <literal>-e</literal> e <literal>-f</literal> são mutuamente exclusivas.
120                     </warning>
121                 </listitem>
122             </varlistentry>
123             <varlistentry>
124                 <term>-f file</term>
125                 <listitem>
126                     <para>
127                         If this option is used, then at the beginning of the Scilab session, after the execution of the scilab and user startup files, and after the setting of user Preferences -- including the working directory ones --,
128                         <itemizedlist>
129                             <listitem>
130                                 <para>
131                                     the current Scilab working directory is set to the shell directory from which Scilab has been launched. For instance,
132                                     <screen><![CDATA[ D:\users\me\scilab\dev> C:\scilab-5.5.2\bin\scilex -f ..\test.sce]]></screen>
133                                     will do a <literal>cd("D:\users\me\scilab\dev")</literal>.
134                                 </para>
135                             </listitem>
136                             <listitem>
137                                 <para>
138                                     the Scilab script <literal>file</literal> is executed. If a relative path is used (default <literal>.\</literal>, or like <literal>..\</literal> in the sample here-above), it refers to the new Scilab working directory.
139                                 </para>
140                             </listitem>
141                         </itemizedlist>
142                     </para>
143                     <para>
144                         A file with .xcos extension will be opened by Xcos.
145                     </para>
146                 </listitem>
147             </varlistentry>
148             <varlistentry>
149                 <term>-quit</term>
150                 <listitem>
151                     <para>This option forces scilab to always exit after the instruction(s) passed with the <literal>-e</literal>
152                     option, or the script referred to by the <literal>-f</literal> option, have been executed,
153                     even in case of a runtime error. This option should always be used in batch mode.
154                     It is ignored if neither <literal>-e</literal> nor <literal>-f</literal> options are present.
155                     </para>
156                 </listitem>
157             </varlistentry>
158             <varlistentry>
159                 <term>-l idioma</term>
160                 <listitem>
161                     <para>Se esta opção estiver presente, ela fica o idioma do usuário.
162                         Os possíveis valores para <literal>idioma</literal> são
163                         <literal>'fr'</literal> para francês, <literal>'en'</literal> para
164                         inglês e 'br' para português brasileiro. O idioma padrão é inglês. O
165                         valor padrão é fixado no arquivo
166                         <literal>scilab.start</literal>.
167                     </para>
168                 </listitem>
169             </varlistentry>
170             <varlistentry>
171                 <term>-nb</term>
172                 <listitem>
173                     <para>"no banner" : Se esta opção está presente, então o cartão de boas-vindas não é impresso.
174                     </para>
175                 </listitem>
176             </varlistentry>
177             <varlistentry>
178                 <term>-ns</term>
179                 <listitem>
180                     <para>"No Startup files" : Se esta opção está presente, o arquivo de inicialização
181                         <literal>SCI/etc/scilab.start</literal> e os arquivos de
182                         inicialização do usuário <literal>SCIHOME/.scilab</literal>,
183                         <literal>SCIHOME/scilab.ini</literal> não são executados.
184                     </para>
185                 </listitem>
186             </varlistentry>
187             <varlistentry>
188                 <term>-nouserstartup</term>
189                 <listitem>
190                     <para>Se esta opção estiver presente, os arquivos de inicialização
191                         do usuário <literal>SCIHOME/.scilab</literal>,
192                         <literal>SCIHOME/scilab.ini</literal> não são executados.
193                     </para>
194                 </listitem>
195             </varlistentry>
196             <varlistentry>
197                 <term>-nw</term>
198                 <listitem>
199                     <para>Se esta opção estiver presente, então o Scilab não é executado
200                         em uma janela específica.
201                     </para>
202                 </listitem>
203             </varlistentry>
204             <varlistentry>
205                 <term>-nwni / -nogui</term>
206                 <listitem>
207                     <important>
208                         This mode prevents loading the Java Virtual Machine.
209                         It starts faster and uses less memory.
210                     </important>
211                     <para>Se esta opção estiver presente, então o Scilab não é executado
212                         em uma janela específica e não aceita interação do usuário
213                         (graphics, export, xcos, scinotes, help browser, Java module,...).
214                     </para>
215                 </listitem>
216             </varlistentry>
217             <varlistentry>
218                 <term>-scihome dir</term>
219                 <listitem>
220                     <para>Forces SCIHOME to the <literal>dir</literal> directory. If the path
221                       includes some white space, it must be specified between double-quotes (no
222                       single quotes!).
223                     </para>
224                 </listitem>
225             </varlistentry>
226             <varlistentry>
227                 <term>--texmacs</term>
228                 <listitem>
229                     <para>Esta opção é reservada para TexMacs.</para>
230                 </listitem>
231             </varlistentry>
232             <varlistentry>
233                 <term>-version</term>
234                 <listitem>
235                     <para>Esta opção imprime a versão do Scilab.</para>
236                 </listitem>
237             </varlistentry>
238         </variablelist>
239     </refsection>
240     <refsection role="arguments">
241         <title>Additional options for Unix/Linux and Mac OS X</title>
242         <para>Advice: use theses options on a Scilab source tree.</para>
243         <variablelist>
244             <varlistentry>
245                 <term>-debug</term>
246                 <listitem>
247                     <para>Inicia o Scilab no debugger gdb.</para>
248                     <para>
249                         The variable <literal>SCILAB_GDB_OPT</literal> may be set to add custom options to gdb.
250                     </para>
251                 </listitem>
252             </varlistentry>
253             <varlistentry>
254                 <term>-debug-kdbg</term>
255                 <listitem>
256                     <para>Start Scilab under kdbg.</para>
257                 </listitem>
258             </varlistentry>
259             <varlistentry>
260                 <term>-profiling</term>
261                 <listitem>
262                     <para>Start Scilab under valgrind.</para>
263                     <para>The variable SCILAB_VALGRIND_OPT may be set to add custom options
264                         to valgrind (and override the existing valgrind options).
265                     </para>
266                 </listitem>
267             </varlistentry>
268             <varlistentry>
269                 <term>-profiling-visu</term>
270                 <listitem>
271                     <para>Start Scilab under callgrind.</para>
272                     <para>The variable SCILAB_VALGRIND_OPT may be set to add custom options
273                         to callgrind (and override the existing callgrind options).
274                     </para>
275                 </listitem>
276             </varlistentry>
277             <varlistentry>
278                 <term>-electric-fence</term>
279                 <listitem>
280                     <para>Start Scilab with the Electric Fence.</para>
281                 </listitem>
282             </varlistentry>
283         </variablelist>
284     </refsection>
285     <refsection role="description">
286         <title>Environment variables</title>
287         <variablelist>
288             <varlistentry>
289                 <term>SCIVERBOSE</term>
290                 <listitem>
291                     <para>
292                         If this variable is present, Scilab startup script will show a startup debug information.
293                         Mainly used for bug report and debugging purposes.
294                     </para>
295                 </listitem>
296             </varlistentry>
297             <varlistentry>
298                 <term>JAVA_HOME</term>
299                 <listitem>
300                     <para>
301                         Specify which Java to use. For example,
302                         <literal>JAVA_HOME=/usr/lib/jvm/java-7-openjdk/ scilab</literal> will start Scilab with Java 7.
303                     </para>
304                 </listitem>
305             </varlistentry>
306             <varlistentry>
307                 <term>SCI_DISABLE_TK</term>
308                 <listitem>
309                     <para>Disable Tk (but not Tcl) features.</para>
310                 </listitem>
311             </varlistentry>
312             <varlistentry>
313                 <term>SCI_JAVA_ENABLE_HEADLESS</term>
314                 <listitem>
315                     <para>
316                         Enable Java Headless VM (i.e. without GUI features).
317                     </para>
318                 </listitem>
319             </varlistentry>
320         </variablelist>
321     </refsection>
322     <refsection role="description">
323         <title>Java Virtual Machine options</title>
324         <warning>
325             The options described here-below are useless and are cancelled if the option <literal>-nwni</literal> is used.
326         </warning>
327         <para>Starting from Scilab 5.0, the graphical user interface (GUI) and the
328             build documentation are based on Java features. In some cases, it can be
329             important to edit the JVM options (Java Virtual Machine).
330         </para>
331         <para>These options are available in the
332             <emphasis>jvm_options.xml</emphasis> file.
333         </para>
334         <para>In version 5.0.X and 5.1.X, this file is stored as
335             <emphasis>SCI/modules/jvm/etc/jvm_options.xml</emphasis>.
336         </para>
337         <para>In version &gt;= 5.2.0, the file is available in
338             <emphasis>etc/jvm_options.xml</emphasis>.
339         </para>
340         <para>
341             <emphasis>
342                 By default, the three following options are
343                 easily accessible in the configuration file:
344             </emphasis>
345         </para>
346         <variablelist>
347             <varlistentry>
348                 <term>-XmxXXXm</term>
349                 <listitem>
350                     <para>This option set the amount of memory available by the Java
351                         Virtual Machine. By default, 256M are allocated. If you change this
352                         value, check that the value does not exceed the memory available on
353                         the system.
354                     </para>
355                     <para>Since Scilab 5.4.0, this value can be changed in the preferences menu.</para>
356                 </listitem>
357             </varlistentry>
358             <varlistentry>
359                 <term>-Djava.compiler=JIT</term>
360                 <listitem>
361                     <para>
362                         This option with the argument <emphasis>JIT</emphasis> enables
363                         the Java Just In Time compiler. It is activated by default.
364                         <emphasis>NONE</emphasis> disables the JIT and decreases
365                         dramatically performances.
366                     </para>
367                 </listitem>
368             </varlistentry>
369             <varlistentry>
370                 <term>-verbose:jni / -Xcheck:jni</term>
371                 <listitem>
372                     <para>These options enable more checks and output from the JNI
373                         calls. These options are useful in case of debugging and are
374                         disabled by default since they decreases performances.
375                     </para>
376                 </listitem>
377             </varlistentry>
378         </variablelist>
379         <para>Many more options are available. They can improve the performances,
380             change look and feel, change memory managements... See: <ulink url="http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html">http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html</ulink>.
381         </para>
382     </refsection>
383     <refsection role="examples">
384         <title>Exemplos</title>
385         <screen><![CDATA[
386 # Let's start Scilab in profiling mode without attaching a gdb once a SIGSEGV is met.
387 # We are under Bash shell
388 export SCILAB_VALGRIND_OPT="--db-attach=no --log-file=myfile.txt"
389 scilab -profiling
390
391 # Let's start Scilab in debug mode without stopping after each SIGSEGV
392 # First, we write a small command file
393 echo "handle SIGSEGV nostop" &> debug.txt
394 # Now set the custom option
395 # We are under Bash shell
396 export SCILAB_GDB_OPT="--command=debug.txt"
397 # Start Scilab in debug mode
398 scilab -debug ]]></screen>
399         <para></para>
400         <screen><![CDATA[
401 # Under GNU/Linux, Mac OS X or Unix:
402 $ echo "disp(%pi)"|scilab-cli
403 or
404 $ echo "disp(%pi)"|scilab -nwni
405
406 # Only open the Scilab help window:
407 $ scilab-adv-cli -e "help()"
408 or
409 $ scilab -nw -e "help()"
410
411
412 # Scilab can be used for scripting aspects:
413 echo "if 1<>2 then exit(99) end"|scilab-cli
414 echo $? ]]></screen>
415     </refsection>
416     <refsection role="see also">
417         <title>Ver também</title>
418         <simplelist type="inline">
419             <member>
420                 <link linkend="startup">startup</link>
421             </member>
422             <member>
423                 <link linkend="sciargs">sciargs</link>
424             </member>
425             <member>
426                 <link linkend="getpid">getpid</link>
427             </member>
428             <member>
429                 <link linkend="getenv">getenv</link>
430             </member>
431             <member>
432                 <link linkend="getversion">getversion</link>
433             </member>
434             <member>
435                 <link linkend="consolebox">consolebox</link>
436             </member>
437             <member>
438                 <link linkend="exit">exit</link>
439             </member>
440         </simplelist>
441     </refsection>
442     <refsection role="history">
443         <title>Histórico</title>
444         <revhistory>
445             <revision>
446                 <revnumber>5.4.0</revnumber>
447                 <revremark>-noatomsautoload added.</revremark>
448             </revision>
449             <revision>
450                 <revnumber>5.4.1</revnumber>
451                 <revremark>scinotes and xcos individual scripts introduced. See SEP #87.</revremark>
452             </revision>
453             <revision>
454                 <revnumber>6.0.0</revnumber>
455                 <revremark>
456                     <literal>-quit</literal> option added. <literal>-mem</literal> option removed.
457                 </revremark>
458             </revision>
459             <revision>
460                 <revnumber>6.0.1</revnumber>
461                 <revremark>
462                     <literal>-scihome</literal> option added.
463                 </revremark>
464             </revision>
465         </revhistory>
466     </refsection>
467 </refentry>