Java bindings on Windows, Step by step installation help please

187 views
Skip to first unread message

Rasael Bervini

unread,
Nov 14, 2012, 1:34:09 PM11/14/12
to cgal-bindi...@googlegroups.com
Hi,

I am working on a project on Windows system and am in need of the java bindings.
I am having troubles following the installation instructions on http://code.google.com/p/cgal-bindings/wiki/Installation. I never used Cmake, SWIG and probably don't even have a C++ compiler.

I would like to ask if somebody could help me creating the binding in a step by step guide.

I have downloaded and installed:
- CGAL 4.1 (I have installed all precompiled libs)
- swigwin 2.0.8
- Cmake  2.8.10.1 (and added it to the system PATH)
- I already have JDK in my system.

I have downloaded the cgal-bindings and place it on my system ie. c:\cgal-bindings

What am I supposed to do now? I don't know how to configure cmake nor swig.
Please help me step by step in creating this bindings.

Also why there is need to do all this procedure to get the bindings? isn't it possible to get a pre-compiled version?

Thank you,
R.Bervini

Paul Williamson

unread,
Nov 15, 2012, 6:06:23 AM11/15/12
to cgal-bindi...@googlegroups.com
I've just done this - as I know, starting from zero there's a steep learning curve. I can't really give you a step-by-step but I can describe what I did.
 
I used the Windows GUI for CMake (cmake-gui) to set the CMake variables as described. The output from CMake is a Visual C++ project file which I then used to build the bindings using MS Visual C++ Express (make sure SWIG is on the Windows PATH). After this I was able to run the bindings examples from the command line.
 
This may be as far as you want to go - but I then integrated them into Eclipse (which is another story)
 
Paul

Jung

unread,
Dec 3, 2012, 1:31:57 AM12/3/12
to cgal-bindi...@googlegroups.com
After few days of struggling, I was able to get java files from CGAL binding.
I am trying to use these files in Eclipse, but I am having problems.
Here is the error message:
Native code library CGAL_Triangulation_2 failed to load. 
java.lang.UnsatisfiedLinkError: no CGAL_Triangulation_2 in java.library.path
The Thread: AWT-EventQueue-0 threw the uncaught exception: no CGAL_Triangulation_2 in java.library.path.  Exiting the application
java.lang.UnsatisfiedLinkError: no CGAL_Triangulation_2 in java.library.path

What can it be the problem?  thanks for your help.

Sebastien Loriot (GeometryFactory)

unread,
Dec 4, 2012, 7:46:41 AM12/4/12
to cgal-bindi...@googlegroups.com
On 12/03/2012 07:31 AM, Jung wrote:
> After few days of struggling, I was able to get java files from CGAL
> binding.
> I am trying to use these files in Eclipse, but I am having problems.
> Here is the error message:
> Native code library CGAL_Triangulation_2 failed to load.
> java.lang.UnsatisfiedLinkError: no CGAL_Triangulation_2 in java.library.path
> The Thread: AWT-EventQueue-0 threw the uncaught exception: no
> CGAL_Triangulation_2 in java.library.path. Exiting the application
> java.lang.UnsatisfiedLinkError: no CGAL_Triangulation_2 in java.library.path
>
> What can it be the problem? thanks for your help.
>

You need to add the path to the lib directory generated by the
compilation of the cgal-bindings for java into your java library path.

Sebastien.

> On Thursday, November 15, 2012 5:06:23 AM UTC-6, Paul Williamson wrote:
>
> I've just done this - as I know, starting from zero there's a steep
> learning curve. I can't really give you a step-by-step but I can
> describe what I did.
> I used the Windows GUI for CMake (cmake-gui) to set the CMake
> variables as described. The output from CMake is a Visual C++
> project file which I then used to build the bindings using MS Visual
> C++ Express (make sure SWIG is on the Windows PATH). After this I
> was able to run the bindings examples from the command line.
> This may be as far as you want to go - but I then integrated them
> into Eclipse (which is another story)
> Paul
>
> On Wednesday, 14 November 2012 18:34:09 UTC, Rasael Bervini wrote:
>
> Hi,
>
> I am working on a project on Windows system and am in need of
> the java bindings.
> I am having troubles following the installation instructions on
> http://code.google.com/p/cgal-bindings/wiki/Installation
> <http://code.google.com/p/cgal-bindings/wiki/Installation>. I

Kate YAN

unread,
Mar 18, 2014, 6:54:24 AM3/18/14
to cgal-bindi...@googlegroups.com
Sebastien Loriot  is right, I add the .so files in /cgal-bindings/build/CGAL-3.9_release/lib to the java.library.path which is /usr/lib in my ubuntu system. Then I solved the problem "Native code library CGAL_Triangulation_2 failed to load. " in eclipse.
Reply all
Reply to author
Forward
0 new messages