46143ad0e409bbaf0490964304cb328c12cb884a
[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>The native library javasci2 does not exist or cannot be found.</para>
38                 </question>
39                 <answer>
40                     <para>java.library.path has not been set or cannot be found.
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>The native library javasci2 does not exist or cannot be found even if java.library.path being set</para>
48                 </question>
49                 <answer>
50                     <para>
51                         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.
52                     </para>
53                 </answer>
54             </qandaentry>
55             <qandaentry>
56                 <question>
57                     <para>A Javasci program fails to start with:
58                         <emphasis role="italic">An exception occurred: Auto detection of SCI failed.
59                             Could not retrieve the variable SCI
60                         </emphasis>
61                     </para>
62                 </question>
63                 <answer>
64                     <para>
65                         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.
66                     </para>
67                 </answer>
68             </qandaentry>
69             
70             <qandaentry>
71                 <question>
72                     <para>I try to plot a graphic but the graphic never appears.</para>
73                 </question>
74                 <answer>
75                     <para>
76                         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.
77                     </para>
78                 </answer>
79             </qandaentry>
80             <qandaentry>
81                 <question>
82                     <para>I would like to attach a graphic from Javasci to an existing Swing application. I don't know how to do that?</para>
83                 </question>
84                 <answer>
85                     <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!
86                     </para>
87                 </answer>
88             </qandaentry>
89             <qandaentry>
90                 <question>
91                     <para>I found the current way to manage Scilab graphic windows from javasci pretty hard. What should I do?</para>
92                 </question>
93                 <answer>
94                     <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.
95                     </para>
96                 </answer>
97             </qandaentry>
98             <qandaentry>
99                 <question>
100                     <para>
101                         The Scilab instance has some external modules but fails to start with an <literal>undefined symbol:</literal>
102                     </para>
103                 </question>
104                 <answer>
105                     <para><literal>
106                             <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>
107                         </literal>
108                         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>
109                     </para>
110                 </answer>
111             </qandaentry>
112         </qandaset>
113     </refsection>
114     <refsection role="see also">
115         <title>See Also</title>
116         <simplelist type="inline">
117             <member>
118                 Browse <link type="remote" linkend="javasci/javadoc/index.html">the documentation of Javasci v2.</link> (this will open the web browser).
119             </member>
120             <member>
121                 <link linkend="javasci">Javasci</link>
122             </member>
123             <member>
124                 <link linkend="compile_and_run_javasci_v2">Compile and run with javasci</link>
125             </member>
126         </simplelist>
127     </refsection>
128 </refentry>