Java

David Gobbi dgobbi at irus.rri.on.ca
Wed Mar 29 11:56:29 EST 2000


On Wed, 29 Mar 2000, Daniel J. Blezek, Ph.D. wrote:

> David, and Randy (and other interested parties),
> 
>   Thanks for the help, I figured out how to get the Java stuff to compile
> out of the box, but had a question/request.  Currently in user.make you
> must specify where you want the *.class files to go (i.e. the
> JAVA_CLASS_HOME variable). Since class files are like ".o"'s shouldn't we
> educate the makefile as to where to put them? I suggest vtk/java/classes.  
> This could me made part of the build process by default, removing the need
> to create a hard path in user.make.
> 
>   Suggestions?

Sounds good.  Perhaps there should also be a --java-class-home configure
option to allow people to set things up that way, too.  But then again,
allowing people to override the JAVA_CLASS_HOME in their user.make should
be sufficient.

>   The mis-feature in removing threads when compiling with Java was
> actually a necessity.  In previous (<1.2.2) versions of Java, JDK used is
> own "green-threads" which weren't compatable with pthreads.  So pthreads
> lost out when using Java.  The configur.in file was changed in Aug 97, and
> the situation has changed, at least in the latest JDK that I got from Sun.  
> If we can decide that pthreads and Java play well for everyone who is
> using them, we could add the changes back in.  FYI, works fine under Linux
> with JDK 1.2.2 & pthreads, but we need a suite of tests for the Java
> bindings.

What problems arose when VTK was using pthreads and java was using
green-threads?  I suppose that if your java program is multithreaded
then VTK will see all of the calls from the java program as if they
came from a single (not multiple) threads but I can't imagine any
instances where this would cause a conflict.  Unless people are
trying to use vtkMutexLock directly from Java which would be silly
in any case.  Callbacks might be a problem, but you always have to
be careful with callbacks in multithreaded code.
 
 - David

> 
> Thanks,
> -dan
> 
> 
> 
>   
> 
> 
> On Tue, 28 Mar 2000, David Gobbi wrote:
> 
> > Hi Dan,
> > 
> > I have vtk/Java building cleanly on my Linux machine at home.
> > The user.make has to be set up properly (of course) and some
> > environment variables i.e. CLASSPATH have to be set.  I think
> > the CLASSPATH is why your build is failing.
> > 
> > Also, configure.in has a 'mis-feature' which disables threading
> > when you configure --with-java.  On both Linux and IRIX I had
> > to edit configure.in to remove this 'feature'.  I'm not sure
> > whether --with-threads and --with-java really are compatible 
> > under solaris so I haven't committed my changes.
> > 
> >   - David
> > 
> > --
> >   David Gobbi, MSc                    dgobbi at irus.rri.on.ca
> >   Advanced Imaging Research Group
> >   Robarts Research Institute, University of Western Ontario
> > 
> > On Tue, 28 Mar 2000, Daniel J. Blezek, Ph.D. wrote:
> > 
> > > Hi all,
> > > 
> > >   Does anyone have any experience building the Java bindings
> > > "out-of-the-tarball" using ./configure; make;  I'm trying to build Java
> > > rpms for the 3.1 release and have had NO luck getting things built easily.
> > > I run into this error:
> > > 
> > > make[1]: Entering directory `/localhome/blezek/vtk-linux/common'
> > > /usr/local/jdk1.2.2/bin/javac -d /localhome/blezek/vtk-linux/java/vtk
> > > -classpath /localhome/blezek/vtk-linux/java/vtk
> > > ../java/vtk/vtkActor2D.java 
> > > ../java/vtk/vtkActor2D.java:7: Superclass vtk.vtkProp of class
> > > vtk.vtkActor2D not found.
> > > public class vtkActor2D extends vtkProp
> > >                                 ^
> > > 1 error
> > > make[1]: *** [../java/vtk/vtkActor2D.class] Error 1
> > > 
> > > 
> > > Even though vtkProp.class exists in java/vtk.
> > > 
> > > Any suggestions?
> > > -dan
> > > 
> > > P.S.  The success of the nightly RPM depends on being able to build
> > > "hand's off"...
> > > 
> > > --
> > > Daniel Blezek, Ph.D.
> > > blezek at crd.ge.com
> > > Computer Graphics and Systems Program
> > > Electronic Systems Lab
> > > GE Corporate Research & Development
> > > 
> > > --------------------------------------------------------------------
> > > This is the private VTK discussion list. Please keep messages on-topic.
> > > Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> > > To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
> > > <majordomo at public.kitware.com>. For help, send message body containing
> > > "info vtkusers" to the same address.
> > > --------------------------------------------------------------------
> > > 
> > 
> 
> --
> Daniel Blezek, Ph.D.
> blezek at crd.ge.com
> Computer Graphics and Systems Program
> Electronic Systems Lab
> GE Corporate Research & Development
> 
> 
> 

--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list