Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - Português - 日本語
Справка Scilab >> Java Interface > javasci FAQ

javasci FAQ

The frequently asked questions for Javasci v2

Questions / Answers

Running an application based on javasci, I get the error Exception in thread "main" java.lang.NoClassDefFoundError: org/scilab/modules/javasci/Scilab

org.scilab.modules.javasci.jar is probably not defined in the CLASSPATH. See Compile and run with javasci

On Unix (Linux or MacOSX), the error message

the native library javasci2 does not exist or cannot be found.
appears.

The dynamic link resolution failed. The java.library.path value has not been set or is poorly handled by your JVM. See Compile and run with javasci to find the right setup.

You might also enforce the sun.boot.library.path environment variables to pre-load the javasci and Scilab libraries.

On Windows, the native library javasci.dll does not exist or cannot be found.

The PATH environment variable may have not been set. See Compile and run with javasci

On Linux/Unix/MacOSX, the native library javasci2 does not exist or cannot be found even if the java.library.path is being set.

If the error is something like: 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, try to set LD_LIBRARY_PATH to the path where Scilab native libraries are.

On Windows, the native library javasci.dll does not exist or cannot be found even if the PATH is being set.

If the error is something like: java.lang.UnsatisfiedLinkError: C:\Program Files\scilab-XXXX\bin\javasci.dll: The specified procedure could not be found, 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.

A Javasci program fails to start with: An exception occurred: Auto detection of SCI failed. Could not retrieve the variable SCI

SCI should be set to scilab-X.Y.Z/share/scilab/ under GNU/Linux, scilab-X.Y.Z/Contents/MacOS/share/scilab/ under Mac OS X and scilab-X.Y.Z/ under Windows.

I try to plot a graphic but the graphic never appears.

Make sure that you called the constructor (Scilab sci = new Scilab(true);) with the boolean value true. It starts Scilab in advanced mode.

I would like to attach a graphic from Javasci to an existing Swing application. I don't know how to do that?

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!

I found the current way to manage Scilab graphic windows from javasci pretty hard. What should I do?

This is embarrassing. 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.

The Scilab instance has some external modules but fails to start with an undefined symbol:

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_ 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 LD_PRELOAD=/path/to/the/lib/providing/the/symbol/libmy.so

See also

Comments

Author : Denis Nefedov posted the 20/01/2016 17:08
Advanced mode doesn't work. Ignoring my crying and obscene language. With no argument constructor = new Scilab(); works but if i add true all goes wrong.
What shoud i do?

Also, how can i get values of an double array from scilab after exec(some script). Other words, i making some mathematic things in my .sci script called in java program and i want to get a result.

Thanks a lot for a one answer at least.
Reply to this comment
Please login to comment this page


See comments in other languages: English: 1 comment(s)

Add a comment:
Please login to comment this page.

Report an issue
<< javasci Java Interface javasci v1 limitations >>

Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Feb 14 15:13:38 CET 2017