[doc] misc. patchs & small improvements
[scilab.git] / scilab / modules / external_objects_java / help / ja_JP / jcompile.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!--
4 *
5 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
6 * Copyright (C) 2010 - 2011 - Calixte DENIZET <calixte@contrib.scilab.org>
7 *
8  * Copyright (C) 2012 - 2016 - Scilab Enterprises
9  *
10  * This file is hereby licensed under the terms of the GNU GPL v2.0,
11  * pursuant to article 5.3.4 of the CeCILL v.2.1.
12  * This file was originally licensed under the terms of the CeCILL v2.1,
13  * and continues to be available under such terms.
14  * For more information, see the COPYING file which you should have received
15  * along with this program.
16 *
17 *
18 -->
19
20 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
21           xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML"
22           xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab"
23           xml:lang="ja" xml:id="jcompile">
24
25     <refnamediv>
26
27         <refname>jcompile</refname>
28
29         <refpurpose>Javaコードまたはファイルをコンパイルする</refpurpose>
30
31     </refnamediv>
32
33     <refsynopsisdiv>
34
35         <title>呼び出し手順</title>
36
37         <synopsis>
38
39             class = jcompile(className, code);
40
41             class = jcompile(javaFiles);
42
43         </synopsis>
44
45     </refsynopsisdiv>
46
47     <refsection>
48
49         <title>パラメータ</title>
50
51         <variablelist>
52
53             <varlistentry>
54
55                 <term>className</term>
56
57                 <listitem>
58
59                     <para>クラス名を指定する文字列</para>
60
61                 </listitem>
62
63             </varlistentry>
64
65             <varlistentry>
66
67                 <term>code</term>
68
69                 <listitem>
70
71                     <para>
72
73                         Javaコードを有する文字列の行または列
74
75                     </para>
76
77                 </listitem>
78
79             </varlistentry>
80
81             <varlistentry>
82
83                 <term>javaFiles</term>
84
85                 <listitem>
86
87                     <para>Javaファイルのパス.</para>
88
89                 </listitem>
90
91             </varlistentry>
92
93             <varlistentry>
94
95                 <term>class</term>
96
97                 <listitem>
98
99                     <para>_JClass型のmlist</para>
100
101                 </listitem>
102
103             </varlistentry>
104
105         </variablelist>
106
107     </refsection>
108
109     <refsection>
110
111         <title>説明</title>
112
113         <para>
114
115             Javaソースコードをコンパイルし, 対応するクラスを読み込みます.
116
117             JDKで配布されるパッケージ tools.jar が classpath に存在しない場合,
118
119             Eclipse Compiler for Java (ECJ) が使用されます.
120
121         </para>
122
123         <para>
124
125             引数がファイルの場合, jcompile はJavaコードをコンパイルします.
126
127         </para>
128         <note>
129             *.class files generated by the compilation are stored in the TMPDIR/JIMS/bin
130             directory.
131         </note>
132
133     </refsection>
134
135     <refsection>
136
137         <title>例</title>
138
139         <programlisting role="example"><![CDATA[
140                hw = jcompile("HelloWorld", ["public class HelloWorld {"
141                                             "public static String getHello() {"
142                                             "return ""Hello World !!"";"
143                                             "}"
144                                             "}"]);
145
146                hello = hw.getHello()
147
148                jremove hello hw
149       ]]></programlisting>
150
151         <programlisting role="example"><![CDATA[
152 fd = mopen(TMPDIR+'/HelloWorld.java','wt');
153 mputl(["public class HelloWorld {"
154                    "public static String getHello() {"
155                    "return ""Hello World !!"";"
156                    "}"
157                    "}"],fd);
158 mclose(fd);
159
160 jcompile(TMPDIR+"/HelloWorld.java")
161       ]]></programlisting>
162
163         <programlisting role="example"><![CDATA[
164 directory=SCI+"/modules/external_objects_java/examples/com/foo/";
165 // Compile of all them
166 jcompile(ls(directory + "/*.java"))
167       ]]></programlisting>
168
169     </refsection>
170
171     <refsection role="see also">
172
173         <title>参照</title>
174
175         <simplelist type="inline">
176             <member>
177                 <link linkend="jimport">jimport</link>
178             </member>
179             <member>
180                 <link linkend="jallowClassReloading">jallowClassReloading</link>
181             </member>
182             <member>
183                 <link linkend="jdeff">jdeff</link>
184             </member>
185             <member>
186                 <link linkend="javasci">javasci</link>
187             </member>
188             <member>
189                 <link linkend="compile_and_run_javasci_v2">javasci v2</link>
190             </member>
191             <member>
192                 <link linkend="javaclasspath">javaclasspath</link>
193             </member>
194         </simplelist>
195
196     </refsection>
197
198     <refsection>
199
200         <title>履歴</title>
201
202         <revhistory>
203
204             <revision>
205
206                 <revnumber>5.5.0</revnumber>
207
208                 <revremark>
209
210                     関数が導入されました. 'JIMS'モジュールに基づきます.
211
212                     JIMSモジュールとの動作上の主な違いは,
213
214                     <link linkend="jautoUnwrap">jautoUnwrap</link>がデフォルトで
215
216                     有効になっていることです.
217
218                 </revremark>
219
220             </revision>
221
222         </revhistory>
223
224     </refsection>
225
226 </refentry>
227
228
229