[vtkusers] Mac OS X, Java guru needed, please.
David Cole
david.cole at kitware.com
Mon Jan 29 15:05:13 EST 2007
On 1/26/07, Mike Jackson <mike.jackson at imts.us> wrote:
>
>
> OK.. dusting off the java cobb webs.... So JavaEmbedding is for
> native Carbon/Cocoa (10.3.9/ppc) that need to instantiate a Java VM
> _within_ the application itself... like a web browser would do if it
> needed to display a Java Applet in a web page. This is NOT what VTK
> with java Wrappings are doing.
>
> What the VTK/Java combo is doing is launching a native java
> program. Then within that java program the VTK JNI libraries are used
> to access VTK functionality. Do you understand the difference?
Yes I do... What I did *not* understand was the purpose of the JavaEmbedding
framework, and CMake's old default choice of setting JAVA_AWT_LIBRARY to
"-framework JavaEmbedding" ... (this was changed in CMake since the
introduction of the intel macs to avoid trying to link a non-existent
framework) -- silly me, I was thinking that was the way you linked in the
AWT functionality... it did not occur to me that the functionality might
exist in *both* JavaEmbedding and JavaVM until I read your email just now.
So I stand by my earlier, although cryptic post, and say that the
> VTK java Wrappings need to link against
> "-framework JavaVM" instead of the JavaEmbedding Framework.
Indeed. I changed my local build to use "-framework JavaVM" for
JAVA_AWT_LIBRARY (and the corresponding header path for
JAVA_AWT_INCLUDE_PATH) and it also works. Thanks for the clarifying email...
David, can you make the change please and lets see what the
> dashboards come back with. Also is this a CMake change or a VTK Change?
Proper JAVA_AWT_* settings should eventually make their way into CMake's
FindJNI.cmake module. For now, I'm considering ways to get them right by
default ("out of the box") for Mac builds of VTK.
Thanks to everyone for sticking with this problem.
Yes, thank you all.
Kenneth Sloan, if you're still reading this thread, try this on your Mac
build of VTK:
- cd into your binary directory
- type "ccmake ." and hit return (or full path to ccmake if it's not in your
env PATH)
- type "t" to toggle to see advanced settings (t again to hide them)
- scroll down and set the following settings:
- JAVA_AWT_LIBRARY should be "-framework JavaVM"
- JAVA_AWT_INCLUDE_PATH should be something like
"/System/Library/Frameworks/JavaVM.framework/Headers"
Hope this finally helps / it sure did take more than a village,
:-)
David Cole
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070129/865d9bc3/attachment.htm>
More information about the vtkusers
mailing list