[vtkusers] awt_Lock

philipp.batchelor at kcl.ac.uk philipp.batchelor at kcl.ac.uk
Fri Apr 4 14:22:26 EST 2003


I did compile vtk myself, and used the java on our system. Matlab was 
installed on our system, it comes with its own jvm. I wasn't able
to get Matlab to use 1.4.1, normally there is an env variable called 
MATLAB_JAVA for this, but matlab doesn't start if I set it to 1.4.1. But 
the fact that the java example without vtkPanel works seems to imply that 
it is not the main issue.
I did test Cone.java, which worked fine, I'll try more examples

P

 On Fri, 4 Apr 2003, Jeff Lee wrote:

> did you compile vtk yourself, or are you using a nightly?  it looks odd 
> that matlab is running a 1.3.1 jvm and you are using vtk binaries linked 
> against java1.4.1.  have you tried any of the java examples that came 
> with vtk?
> -Jeff
> 
> philipp.batchelor at kcl.ac.uk wrote:
> 
> >>What does the stack trace look like?  awt_Lock comes from java libs.  
> >>Can you post the offensive code and also include a copy of the vtkPanel 
> >>you are using?  Is this vtk4.2?
> >>-Jeff
> >>
> >>    
> >>
> >
> >Yes, sorry, vtk 4.2, (gcc 3.2).
> >In matlab, the whole error message is:
> ><BEGIN MATLAB ERROR>
> >  
> >
> >>h = javaObject('HelloWorldApp')
> >>    
> >>
> >??? Error using ==> javaObject
> >Java exception occurred:
> >java.lang.UnsatisfiedLinkError: 
> >/projects/vtk/linux2.2/vtkNightly/VTK-4.2.1/bin/libvtkRenderingJava.so: 
> >/usr/local/java/j2sdk1.4.1/jre/lib/i386/libjawt.so: undefined symbol: 
> >awt_Lock
> >        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
> >        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1382)
> >        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1306)
> >        at java.lang.Runtime.loadLibrary0(Runtime.java:749)
> >        at java.lang.System.loadLibrary(System.java:820)
> >        at vtk.vtkPanel.<clinit>(vtkPanel.java:31)
> >        at HelloWorldApp.<init>(HelloWorldApp.java:22).
> >
> ><END MATLAB>
> >The HelloWorldApp.java is
> ><BEGIN JAVA CLASS>
> >import vtk.*;
> >public class HelloWorldApp {
> >    public HelloWorldApp() {System.out.println("Hello Yalin!"); };
> >    public static void hello() {
> >        System.out.println("Hello World! 2"); //Display the string.
> >    }
> >    protected vtkPanel renPanel = new vtkPanel();
> >   
> >}
> ><END>
> >
> >Without the vtkPanel line, matlab runs the class as expected. 
> >Doing  System.loadLibrary("vtkRenderingJava"); leads to the same error 
> >message.
> >Cheers,
> >P
> >
> >  
> >
> >>vtk 
> >>    
> >>
> >mailing list led me to try putting a > >
> >  
> >
> >>>'protected vtkPanel renPanel = new vtkPanel();'
> >>>
> >>>just before. This then causes the error message 
> >>>'...libvtkRenderingJava.so: 
> >>>/usr/local/java/j2sdk1.4.1/jre/lib/i386/libjawt.so: undefined symbol: awt_Lock
> >>>
> >>>and a search for 'awt_Lock' doesn't find much, the most relevant maybe 
> >>>http://www.thalion-graphics.de/jgraph/doc/devel/graph3d-jniconstraints.html
> >>>
> >>>All the other vtk libraries do not generate complaints from matlab, so the 
> >>>problem really seems to come from
> >>>System.loadLibrary("vtkRenderingJava");  
> >>>
> >>>I greped the vtk source for 'awt', but I'm not sure what to look for, I 
> >>>also ldd'ed the libraries, this looks ok. 
> >>>I'm not an everyday user of java, so maybe I'm missing something? 
> >>>
> >>>Versions:
> >>>linux: RH 7.1, 2.4.7-10
> >>>java: jdk1.4.1
> >>>matlab: 6.5r13,
> >>>typing version -java in matlab produces 'Java 1.3.1 with Blackdown 
> >>>Java-Linux Team Java HotSpot(TM) Server VM'
> >>>I noticed in vtkJavaAwt.h 'awt.version = JAWT_VERSION_1_3;'
> >>>could it be a version problem?
> >>>
> >>>any suggestion welcome...and sorry as I realise that it is as much a java 
> >>>question as a vtk one.
> >>>
> >>>P. Batchelor
> >>>
> >>>
> >>>_______________________________________________
> >>>This is the private VTK discussion list. 
> >>>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> >>>Follow this link to subscribe/unsubscribe:
> >>>http://public.kitware.com/mailman/listinfo/vtkusers
> >>>
> >>> 
> >>>
> >>>      
> >>>
> >>_______________________________________________
> >>This is the private VTK discussion list. 
> >>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> >>Follow this link to subscribe/unsubscribe:
> >>http://public.kitware.com/mailman/listinfo/vtkusers
> >>
> >>    
> >>
> >
> >_______________________________________________
> >This is the private VTK discussion list. 
> >Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> >Follow this link to subscribe/unsubscribe:
> >http://public.kitware.com/mailman/listinfo/vtkusers
> >
> >  
> >
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
> 




More information about the vtkusers mailing list