Improve the Javasci documentation (FAQ)
[scilab.git] / scilab / modules / javasci / help / en_US / javasci_faq.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2008 - INRIA - Allan CORNET
5  *
6  * This file must be used under the terms of the CeCILL.
7  * This source file is licensed as described in the file COPYING, which
8  * you should have received as part of this distribution.  The terms
9  * are also available at
10  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11  *
12  -->
13 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" scilab:needs-examples="no" xml:id="javasci_faq_v2" xml:lang="en">
14     <refnamediv>
15         <refname>javasci FAQ</refname>
16         <refpurpose>The frequently asked questions for Javasci v2</refpurpose>
17     </refnamediv>
18     <refsection>
19         <title>Questions / Answers</title>
20         <qandaset>
21             <qandaentry>
22                 <question>
23                     <para>Running an application based on javasci, I get the error
24                         <emphasis role="italic">Exception in thread "main" java.lang.NoClassDefFoundError:
25                             org/scilab/modules/javasci/Scilab
26                         </emphasis>
27                     </para>
28                 </question>
29                 <answer>
30                     <para>org.scilab.modules.javasci.jar is probably not defined in the CLASSPATH. See
31                         <link linkend="compile_and_run_javasci_v2">Compile and run with javasci</link>
32                     </para>
33                 </answer>
34             </qandaentry>
35             <qandaentry>
36                 <question>
37                     <para>On Linux/Unix/MacOSX, the native library javasci2 does not exist or cannot be found.</para>
38                 </question>
39                 <answer>
40                     <para>Probably the java.library.path value has not been set. See
41                         <link linkend="compile_and_run_javasci_v2">Compile and run with javasci</link>
42                     </para>
43                 </answer>
44             </qandaentry>
45             <qandaentry>
46                 <question>
47                     <para>On Windows, the native library javasci.dll does not exist or cannot be found.</para>
48                 </question>
49                 <answer>
50                     <para>The PATH environment variable may have not been set. See
51                         <link linkend="compile_and_run_javasci_v2">Compile and run with javasci</link>
52                     </para>
53                 </answer>
54             </qandaentry>
55             <qandaentry>
56                 <question>
57                     <para>On Linux/Unix/MacOSX, the native library javasci2 does not exist or cannot be found even if the java.library.path is being set.</para>
58                 </question>
59                 <answer>
60                     <para>
61                         If the error is something like: <emphasis role="italic">java.lang.UnsatisfiedLinkError: /path/to/scilab/lib/scilab/libscilab.so.0.0.0: libsciparameters.so.5: cannot open shared object file: No such file or directory</emphasis>, try to set LD_LIBRARY_PATH to the path where Scilab native libraries are.
62                     </para>
63                 </answer>
64             </qandaentry>
65             <qandaentry>
66                 <question>
67                     <para>On Windows, the native library javasci.dll does not exist or cannot be found even if the PATH is being set.</para>
68                 </question>
69                 <answer>
70                     <para>
71                         If the error is something like: <emphasis role="italic">java.lang.UnsatisfiedLinkError: C:\Program Files\scilab-XXXX\bin\javasci.dll: The specified procedure could not be found</emphasis>, your PATH environment variable may introduce a conflict between the Scilab libraries with other libraries on your system. Try to move (in the PATH variable) the Scilab path to the front of paths.
72                     </para>
73                 </answer>
74             </qandaentry>
75             <qandaentry>
76                 <question>
77                     <para>A Javasci program fails to start with:
78                         <emphasis role="italic">An exception occurred: Auto detection of SCI failed.
79                             Could not retrieve the variable SCI
80                         </emphasis>
81                     </para>
82                 </question>
83                 <answer>
84                     <para>
85                         SCI should be set to <emphasis role="italic">scilab-X.Y.Z/share/scilab/ under GNU/Linux</emphasis>, <emphasis role="italic">scilab-X.Y.Z/Contents/MacOS/share/scilab/</emphasis> under Mac OS X and <emphasis role="italic">scilab-X.Y.Z/</emphasis> under Windows.
86                     </para>
87                 </answer>
88             </qandaentry>
89
90             <qandaentry>
91                 <question>
92                     <para>I try to plot a graphic but the graphic never appears.</para>
93                 </question>
94                 <answer>
95                     <para>
96                         Make sure that you called the constructor (<emphasis role="italic">Scilab sci = new Scilab(true);</emphasis>) with the boolean value <emphasis role="italic">true</emphasis>. It starts Scilab in advanced mode.
97                     </para>
98                 </answer>
99             </qandaentry>
100             <qandaentry>
101                 <question>
102                     <para>I would like to attach a graphic from Javasci to an existing Swing application. I don't know how to do that?</para>
103                 </question>
104                 <answer>
105                     <para>Well. For now, it is not possible out of the box. The feature should be available in a future version of Scilab. As always, contributions are welcome!
106                     </para>
107                 </answer>
108             </qandaentry>
109             <qandaentry>
110                 <question>
111                     <para>I found the current way to manage Scilab graphic windows from javasci pretty hard. What should I do?</para>
112                 </question>
113                 <answer>
114                     <para>This is embarassing. We are aware that the current solution is far from perfect. We hope we will be able to tackle this limitation in a future release.
115                     </para>
116                 </answer>
117             </qandaentry>
118             <qandaentry>
119                 <question>
120                     <para>
121                         The Scilab instance has some external modules but fails to start with an <literal>undefined symbol:</literal>
122                     </para>
123                 </question>
124                 <answer>
125                     <para><literal>
126                             <emphasis role="italic">atomsLoad: An error occurred while loading 'module-0.0.2':  link : Library could not be loaded: /path/2.0-1/sci_gateway/c/../../src/cpp/libmy.so: undefined symbol: scirun_</emphasis>
127                         </literal>
128                         There are two potential solutions. First is to fix the module itself to build with the library providing the symbol. The second is to define the missing declared library with <literal>LD_PRELOAD=/path/to/the/lib/providing/the/symbol/libmy.so</literal>
129                     </para>
130                 </answer>
131             </qandaentry>
132         </qandaset>
133     </refsection>
134     <refsection role="see also">
135         <title>See Also</title>
136         <simplelist type="inline">
137             <member>
138                 Browse <link type="remote" linkend="javasci/javadoc/index.html">the documentation of Javasci v2.</link> (this will open the web browser).
139             </member>
140             <member>
141                 <link linkend="javasci">Javasci</link>
142             </member>
143             <member>
144                 <link linkend="compile_and_run_javasci_v2">Compile and run with javasci</link>
145             </member>
146         </simplelist>
147     </refsection>
148 </refentry>