[Scilab-Dev] [javasci] running scilab from a eclipse rcp application

arthi bhat bhat_ak at yahoo.com
Tue Jun 22 20:26:04 CEST 2010


Otto <wesendon at ...> writes:

> 
> Hi,
> 
> I'm trying to integrate scilab into a eclipse based application. I've 
> managed to use javasci in a normal java application without bigger 
> problems. But I didn't manage to run it from a eclipse application.
> Eclipse uses OSGI and there's a lot going on with different classloader 
> and so on, and configuration can get quite hard from time to time.
> 
> For the normal java application I've just included the javasci jar and 
> set the path variables and all went well. Calling it from an eclipse 
> plugin brings this exception:
> 
> java.lang.NoClassDefFoundError: org/scilab/modules/jvm/Scilab
>   at javasci.Scilab.Initialize(Native Method)
>   at javasci.Scilab.<clinit>(Unknown Source)
>   at amf.plugin.ScilabMethod.getResult(ScilabMethod.java:36)
>   at 
>
> 
> So, does anyone has experience with eclipse and knows how to solve this? 
> Or do you got any hints anyway?
> 
> Thanks in advance, regards,
> Otto
> 
> 


Hi,
Try this out since you state that you can get scilab working with java when
you are not using eclipse:
1) Bring up Eclipse and right Click on the project you are working with

2) Select 'Build Path'->'Add External Archives'

3) Change Directory to where the 'javasci.jar' file
is installed on your C drive and select the jar file.

The javasci.jar file should now be added to your project and all your
scilab commands in your java files and the import javasci.*; should be compiling
properly.

Hope this helps.

Regards,
Arthi




More information about the dev mailing list