FreeBSD - no jogl in java.library.path

classic Classic list List threaded Threaded
3 messages Options
Rob Farmer Rob Farmer
Reply | Threaded
Open this post in threaded view
|

FreeBSD - no jogl in java.library.path

On FreeBSD with Scilab 5.2.2, I am getting the following upon opening
the demos menu and selecting GUI:

terminate called after throwing an instance of
'GiwsException::JniCallMethodException'
  what():  Exception when calling Java method : no jogl in java.library.path
 at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
 at java.lang.Runtime.loadLibrary0(Runtime.java:823)
 at java.lang.System.loadLibrary(System.java:1030)
 at com.sun.opengl.impl.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:189)
 at com.sun.opengl.impl.NativeLibLoader.access$000(NativeLibLoader.java:49)
 at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.java:80)
 at com.sun.opengl.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:103)
 at com.sun.opengl.impl.NativeLibLoader.access$200(NativeLibLoader.java:49)
 at com.sun.opengl.impl.NativeLibLoader$1.run(NativeLibLoader.java:111)
 at java.security.AccessController.doPrivileged(Native Method)
 at com.sun.opengl.impl.NativeLibLoader.loadCore(NativeLibLoader.java:109)
 at com.sun.opengl.impl.x11.X11GLDrawableFactory.<clinit>(X11GLDrawableFactory.java:101)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:169)
 at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:111)
 at javax.media.opengl.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:520)
 at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:131)
 at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:90)
 at org.scilab.modules.gui.bridge.canvas.SwingScilabCanvasImpl.<clinit>(Unknown
Source)
 at org.scilab.modules.gui.bridge.CallScilabBridge.useCanvasForDisplay(Unknown
Source)
no jogl in java.library.path
 at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
 at java.lang.Runtime.loadLibrary0(Runtime.java:823)
 at java.lang.System.loadLibrary(System.java:1030)
 at com.sun.opengl.impl.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:189)
 at com.sun.opengl.impl.NativeLibLoader.access$000(NativeLibLoader.java:49)
 at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.java:80)
 at com.sun.opengl.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:103)
 at com.sun.opengl.impl.NativeLibLoader.access$200(NativeLibLoader.java:49)
 at com.sun.opengl.impl.NativeLibLoader$1.run(NativeLibLoader.java:111)
 at java.security.AccessController.doPrivileged(Native Method)
 at com.sun.opengl.impl.NativeLibLoader.loadCore(NativeLibLoader.java:109)
 at com.sun.opengl.impl.x11.X11GLDrawableFactory.<clinit>(X11GLDrawableFactory.java:101)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:169)
 at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:111)
 at javax.media.opengl.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:520)
 at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:131)
 at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:90)
 at org.scilab.modules.gui.bridge.canvas.SwingScilabCanvasImpl.<clinit>(Unknown
Source)
 at org.scilab.modules.gui.bridge.CallScilabBridge.useCanvasForDisplay(Unknown
Source)

It seem Scilab isn't able to find jogl, but I'm not sure how to tell
it where to look. jogl.jar exists in /usr/local/share/java/classes/

/usr/local/share/scilab/etc/classpath.xml has this by default:
<path value="/usr/local/share/java/classes//jogl.jar" load="onUse">
        <load on="graphics"/>
        <load on="graphic_export"/>
        <load on="XCos"/>
</path>

/usr/local/share/scilab/etc/jvm_options.xml has this by default:
<option value="-Djava.library.path="/>
I changed it to:
<option value="-Djava.library.path=/usr/local/share/java/classes/"/>

/usr/local/share/scilab/etc/librarypath.xml has this by default:
<!-- Default path to the JNI classes under some Linux (JoGL under
Debian for example) -->
<path value="/usr/lib/jni/"/>
I changed it to:
<!-- Default path to the JNI classes under some Linux (JoGL under
Debian for example) -->
<path value="/usr/local/share/java/classes/"/>

After these changes, Scilab seems to recognize the new path, but still crashes:

-->javalibrarypath
 ans  =

!/usr/local/share/java/classes/              !
!                                            !
!/usr/local/share/scilab//../../lib/scilab/  !

I'm not sure how to proceed from here...

--
Rob Farmer

sylvestre sylvestre
Reply | Threaded
Open this post in threaded view
|

Re: FreeBSD - no jogl in java.library.path

Oups Rob. I am very sorry. I missed your email.


Le jeudi 22 juillet 2010 à 15:45 -0700, Rob Farmer a écrit :
> On FreeBSD with Scilab 5.2.2, I am getting the following upon opening
> the demos menu and selecting GUI:
>
> terminate called after throwing an instance of
> 'GiwsException::JniCallMethodException'
>   what():  Exception when calling Java method : no jogl in java.library.path
[...]

>  at org.scilab.modules.gui.bridge.canvas.SwingScilabCanvasImpl.<clinit>(Unknown
> Source)
>  at org.scilab.modules.gui.bridge.CallScilabBridge.useCanvasForDisplay(Unknown
> Source)
>
> It seem Scilab isn't able to find jogl, but I'm not sure how to tell
> it where to look. jogl.jar exists in /usr/local/share/java/classes/
Actually, it searches for the native jogl libraries (the native one).

For example, under Debian:
$ dpkg -L libjogl-jni|grep .so
/usr/lib/jni/libjogl_awt.so
/usr/lib/jni/libgluegen-rt.so
/usr/lib/jni/libjogl.so


> After these changes, Scilab seems to recognize the new path, but still crashes:
When it crashes here, do you get the same error message ?


Cheers,
Sylvestre
--
-------------------------
Sylvestre Ledru
-------------------------
The Scilab Consortium
Digiteo
Domaine de Voluceau
Rocquencourt - B.P. 105
78153 Le Chesnay Cedex
France


Rob Farmer Rob Farmer
Reply | Threaded
Open this post in threaded view
|

Re: FreeBSD - no jogl in java.library.path

On Sun, Aug 15, 2010 at 12:52 PM, Sylvestre Ledru
<[hidden email]> wrote:

> Oups Rob. I am very sorry. I missed your email.
>
>
> Le jeudi 22 juillet 2010 à 15:45 -0700, Rob Farmer a écrit :
>> On FreeBSD with Scilab 5.2.2, I am getting the following upon opening
>> the demos menu and selecting GUI:
>>
>> terminate called after throwing an instance of
>> 'GiwsException::JniCallMethodException'
>>   what():  Exception when calling Java method : no jogl in java.library.path
> [...]
>
>>  at org.scilab.modules.gui.bridge.canvas.SwingScilabCanvasImpl.<clinit>(Unknown
>> Source)
>>  at org.scilab.modules.gui.bridge.CallScilabBridge.useCanvasForDisplay(Unknown
>> Source)
>>
>> It seem Scilab isn't able to find jogl, but I'm not sure how to tell
>> it where to look. jogl.jar exists in /usr/local/share/java/classes/
> Actually, it searches for the native jogl libraries (the native one).

Ok - that would be the problem. I was trying the path to the jar file,
but the Freebsd puts the .so files in a different place (just
/usr/local/lib/). Using that path works.

Thanks,
--
Rob Farmer

>
> For example, under Debian:
> $ dpkg -L libjogl-jni|grep .so
> /usr/lib/jni/libjogl_awt.so
> /usr/lib/jni/libgluegen-rt.so
> /usr/lib/jni/libjogl.so
>
>
>> After these changes, Scilab seems to recognize the new path, but still crashes:
> When it crashes here, do you get the same error message ?
>
>
> Cheers,
> Sylvestre
> --
> -------------------------
> Sylvestre Ledru
> -------------------------
> The Scilab Consortium
> Digiteo
> Domaine de Voluceau
> Rocquencourt - B.P. 105
> 78153 Le Chesnay Cedex
> France
>
>