开发者

Can anyone describe in detail how to set up javasci (SCILAB) in eclipse right, please?

I am trying to set up SCILAB's javasci ineclipse for the whole day, but it's not working and I don't know, what they want to tell me with http://www.scilab.org/product/man/compile_and_run_javasci.html

in included the javasci.jar in the properties/libraray so that eclipse knows the special comands but afterwards it desn't work. I copied the javasci.dll into the folder and nothing happaned and I don't know why a开发者_运维百科nd whre to set up the stuff mentioned on the manual page.

if anyone of you have doe this before, pleaaaase tell me how and what to do!

I'm using scilab 5.2.1 and winxp and I'm just a hobby programmer, so please describe step-by-step.

THANK you in advance, Andreas


I am not familiar with SCILAB, but it sounds like you need to define the java library path so it knows where to find your dll.

From command-line, it's done with -Djava.library.path or in a batch file. In eclipse, you can define -Djava.library.path in the vm arguments in the launcher for your main class. You can find and configure all the launchers through the run/debug buttons.

EDIT: according to the page that you referred to, you need to add the folder where the dll resides to your global windows path (and my guess is that you'll need to reboot afterwards as well). Still, I'd use java.library.path.


1] Set PATH environment variable

From the desktop, right-click My Computer and click Properties.In the System Properties window, click on the Advanced tab. In the Advanced section, click the Environment Variables button. Finally, in the Environment Variables window , highlight the Path variable in the Systems Variable section and click the Edit button.

Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon as shown below.

C:\Program Files\Scilab-5.3.3\bin;C:\Program Files;C:\Winnt;C:\Winnt\System32 and leave others and click on Apply

To check that it works, opens a new windows command line and type:

wscilex.exe 

It will start scilab in gui mode and proves it that setup of PATH environment is correct

2] Always from windows command , check java jre version:

C:\>java -version
java version "1.6.29"
Java(TM) SE Runtime Environment (build 1.6.29-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

If you have a 32 bit version of jre, you must use a 32 bit version of Scilab,
if you have a 64 bit version of jre, you must use a 32 bit version of Scilab.


You need create two variables in configurations Run, on the eclipse.
The first variable will point to two folders, ../scilab-5.4.1/lib/scilab and ../scilab-5.4.1/lib/thirdparty.
The second variable will point to folder ../scilab-5.4.1/share/scilab

eclipse >> Run configurations >> Environment >> New... >>   
name = LD_LIBRARY_PATH >> value = path of scilab/scilab-  
5.4.1/lib/scilab:/path of scilab/scilab-5.4.1/lib/thirdparty >> Ok  

New... >> name = SCI >> value = path of scilab/scilab-5.4.1/share/scilab >> Ok >> Apply

You need too import two library that are on the folder ../scilab-5.4.1/share/scilab/modules/javasci/jar and ../scilab-5.4.1/share/scilab/modules/types/jar


I have encountered this problem too on my windows 7 x64, I solved it by:

  1. Setting the PATH variable to: C:\Program Files\scilab-5.5.0-beta-1\bin with "Append Environment to native environment" checked in the bottom

  2. Setting the JRE to JDK in the Java build path libraries:

    1. Right click project folder
    2. Select "Configure build path"
    3. Remove the existing JRE System Library
    4. Click the "Add library" button, choose "JRE System Library", "Installed JREs", "Add", "Standard VM"
    5. For JRE Home, input your JDK location, e.g. C:\Program Files\Java\jdk1.7.0_40\bin, then finish dialogs until you are back in the uild path configuration
    6. Choose the option to add an alternate JRE, and select the one you just configured

Note that the JDK path may be different on your system depending on which version you have installed and where you installed it. Modify it as appropriate.

The reason for the bug is that it is actually compiled on JDK but JRE tries to run it and can't find the appropriate NATIVE files that the JDK compiled.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜