igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Using Igraph routines in Java


From: Tamas Nepusz
Subject: Re: [igraph] Using Igraph routines in Java
Date: Wed, 7 Jan 2009 09:50:24 +0000

Hi Shrijeet,

I believe in past folks mush have faced similar situations, using igraph from Java code. One approach could be using Jython (embedded) as explain here
Although I'm not too familiar with Jython, I don't think that would work. The problem is that there are several "flavours" of Python: CPython (this is what most people call Python); Jython (a Python implementation in Java); IronPython (Python in .NET); PyPy (Python in Python) and so on. igraph is a module for CPython. The reason why it wouldn't work with other Python flavours is that the "glue code" between the Python layer and the actual igraph library is written in C. (If there's a Jython expert out there who can confirm or refute this claim, please stand forward).

A Java interface for igraph has already been proposed on this mailing list earlier. As we have an interface generator for igraph what Gabor uses to build the R interface, I started investigating the possibility of generating a Java interface for igraph using the Java Native Interface (JNI). If you check out the source tree from Launchpad and take a look at interfaces/java, you'll see how far I got. Practically, I am convinced that it is possible to generate an interface between igraph and Java using this approach, but since I don't use Java too often, chances are that this interface will be finished if someone is willing to develop and maintain it. This is the README file that summarises my experiments:

http://bazaar.launchpad.net/%7Eigraph/igraph/0.6-main/annotate/head%3A/interfaces/java/README

--
T.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]