[Scilab-Dev] [javasci] running scilab from a eclipse rcp application
G. Azema
guillaume.azema at cnes.fr
Wed Oct 13 16:37:01 CEST 2010
He meant he cant get it to work when used in an eclipse based application, not
in eclipse. (an eclipse plug-in , or RCP application whichever you want
to call it).
I have exactly the same problem, it works fine when used in a regular java
project, but doesnt work when used in an eclipse RCP application.
Did anyone find the solution for this ?
Thank you.
PS :
Here is the post I made on Scilab bugzilla :
Hello,
I am trying to use Scilab in my Java Application using javasci.
I am running under Windows 2000, and using Eclipse 3.6.
I have followed the steps indicated in the help which were
set the SCI environnement variable to scilab root
set the PATH environnement variable to SCI/bin
Create a java project from scratch.
Properties of project --> Java Build Path -->
librairies --> Add external jars
: javasci.jar.
Add a simple BasicExample.java file to my project
// A simple Java example
// Filename: BasicExample.java
import javasci.Scilab;
public class BasicExample {
public static void main(String []args){
Scilab.Exec("disp((%pi^2)/6);");
}
}
Run this and this works.
----------------------------------------------------
Now I am trying to do the same, in an eclipse plugin
for my eclipse RCP application.
Compilation works fine but when I run the application I get a popup window
saying Scilab cant reach main java scilab
class. Please check thirdparty .... etc.
And in Eclipse console :
Ne peut pas accéder à la Classe Principale de Scilab:
java.lang.NoClassDefFoundError: org/scilab/modules/jvm/Scilab
at javasci.Scilab.Initialize(Native Method)
at javasci.Scilab.<clinit>(Unknown Source)
.........
Caused by: java.lang.ClassNotFoundException:
org.scilab.modules.jvm.Scilab
at
org.eclipse.osgi.internal.loader.BundleLoader.
findClassInternal(BundleLoader.java:506)
It seems that It cant find org.scilab.modules.jvm.Scilab.
So I also added the org.scilab.modules.jvm.jar to
my classpath and run my application again and now I get this :
!SESSION 2010-10-13 16:24:27.593 --------
eclipse.buildId=unknown
java.version=1.6.0_06
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=fr_FR
Framework arguments: -application jRevisite.application -pluginCustomization
D:\PROGRAM\eclipse\workspace\jRevisite\plugin_customization.ini
Command-line arguments: -application jRevisite.application -data
D:\PROGRAM\eclipse\workspace/../runtime-jRevisite.application -dev
file:D:/PROGRAM/eclipse/workspace/.metadata/.plugins/org.eclipse.pde.core/
jRevisite.application/dev.properties
-pluginCustomization
D:\PROGRAM\eclipse\workspace\jRevisite\plugin_customization.ini -os win32 -ws
win32 -arch x86
-consoleLog
!ENTRY org.eclipse.ui 4 4 2010-10-13 16:24:33.857
!MESSAGE Reference item additions not found for action null
#
# An unexpected error has been detected by Java Runtime Environment:
#
# Internal Error (0xe06d7363), pid=11328, tid=11700
#
# Java VM: Java HotSpot(TM) Client VM (10.0-b22
mixed mode, sharing windows-x86)
# Problematic frame:
# C [KERNEL32.dll+0x2bcb1]
#
# An error report file with more information is saved as:
# D:\PROGRAM\eclipse\hs_err_pid11328.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Is this a bug or is it me doing something wrong here ?
Thank you.
More information about the dev
mailing list