Hi Mike,<br><br>Thanks for the suggestions, unfortunately it's still not working.<br><br>I had tried putting print statements in the code and I found that it is getting into the main method -- it's stopping at the first line of code.
i.e. my code is as follows:<br><br> public static void main (String []args) {<br> System.out.println("create an instance of vtkConeSource");<br> vtkConeSource cone = new vtkConeSource();<br> System.out.println
("set Height");<br> cone.SetHeight( 3.0 );<br><br>and so "create an instance of vtkConeSource" gets printed but "set Height" does not.<br><br>I did build VTK with RPATH set to OFF. I tried putting the libraries in /Library/Java/Extensions/ and when I did that, I get the error:
<br>Exception in thread "main" java.lang.UnsatisfiedLinkError: VTKInit<br>but the code stops in exactly the same place as before (except before the code just hung and the program did not exit)<br><br>Also I do seem to need to set the DYLD_LIBRARY_PATH as when I don't, I get the error:
<br>Loading Libraries<br>dyld: java can't open library: libvtkCommon.dylib.5.0 (No such file or directory, errno = 2)<br>Trace/BPT trap<br><br>Jennifer<br><br><div><span class="gmail_quote">On 8/2/07, <b class="gmail_sendername">
Mike Jackson</b> <<a href="mailto:imikejackson@gmail.com">imikejackson@gmail.com</a>> wrote:</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Is your java program even making it into the main() method? can<br>you put a system.out.println("Yep"); as the first line inside main()<br>and see if that even gets output?<br><br>Java needs to know where your native libraries are: It looks in a few
<br>default locations: /Library/Java/Extensions is one place. If you need<br>it to look in other places I think there are command line options to<br>the "java" command that can have the jvm look in other places.
<br><br>The knee jerk reaction to this is to just copy the VTK libs into /<br>Library/Java/Extensions which may or may NOT work depending if you<br>built VTK with RPATH ON or OFF. If you Built vtk with RPATH OFF then<br>putting all the vtk libs in /Library/Java/Extensions may work.
<br><br>If you do not understand what the ramifications or setting the RPATH<br>is then take a look through Apple's Dev Docs to find out. It is long<br>and complicated.<br><br>Hope some of that helps.<br><br>With respect to
10.3.9 versus 10.4.x, I think they generally work the<br>same as far as Java is concerned. Both have at least a 1.4 jvm. The c+<br>+ compiler may be different. GCC 3.3 versus 4.0 (default) under 10.4.<br><br>--<br>Mike Jackson Senior Research Engineer
<br>Innovative Management & Technology Services<br><br><br>On Aug 2, 2007, at 10:48 AM, Sean McBride wrote:<br><br>> On 8/1/07 5:58 PM, Jennifer West said:<br>><br>>> Thanks for the pointer to the article. I tried the workaround
<br>>> described<br>>> there, but that did not solve the problem.<br>>><br>>> I set the DYLD_LIBRARY_PATH as described in these instructions:<br>>><br>>> <a href="http://public.kitware.com/pipermail/vtkusers/2006-July/085918.html">
http://public.kitware.com/pipermail/vtkusers/2006-July/085918.html</a><br>>><br>>> Although those were written for OS 10.4 and I'm using 10.3.9 - not<br>>> sure if<br>>> that makes a difference.
<br>><br>> As I've said, I don't know Java..... but I think that post is mostly<br>> obsolete. There were some CMake bugs wrt Java that have now been<br>> fixed.<br>><br>> Are you able to try in
10.4? My feeling from the mailing list is that<br>> few people are still using 10.3. Is there a particular reason you are<br>> on 10.3 still?<br>><br>> --<br>> ____________________________________________________________
<br>> Sean McBride, B. Eng <a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a><br>> Rogue Research <a href="http://www.rogue-research.com">www.rogue-research.com
</a><br>> Mac Software Developer Montréal, Québec, Canada<br>><br>><br>> _______________________________________________<br>> This is the private VTK discussion list.<br>> Please keep messages on-topic. Check the FAQ at:
<a href="http://www.vtk.org/">http://www.vtk.org/</a><br>> Wiki/VTK_FAQ<br>> Follow this link to subscribe/unsubscribe:<br>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers
</a><br><br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ
</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br>