[redland] Re: Cannot build Java API under Red Hat Linux 7.1

Dave Beckett <Dave.Beckett at bristol.ac.uk> Dave.Beckett at bristol.ac.uk
Tue Dec 10 20:11:48 GMT 2002


[replying via HTML forms since Yahoogroups hasn't delivered this
mail to me!]

--- In redland at yahoogroups.com, "l.m.orchard <deus_x at p...>"
<deus_x at p...> wrote:
> Having some strange proglems building the Java API.  The .so seems to
> build fine, but then when it tries to compile org.librdf.redland.core,
> I get this:
> 
> env CLASSPATH=. javac skeleton.java
> ./org/librdf/redland/core.java:17: illegal start of expression
>   public static void librdf_free_world(SWIGTYPE_p_librdf_world_s
world) {
>    ^
> ./org/librdf/redland/core.java:371: ';' expected
> }
> 
> I don't know much about JNI or SWIG, but I see a core.java file with
> no closing brackets for any of its static methods.  Is this right?
> ...

It seems an interaction with what I needed to do, to add the
code that loads the shared library that implements the core
redland/java interface.  I had to edit the generated SWIG java
file and it seems to have got it wrong in that case.

> ... I
> closed all the methods with brackets, and it starts to compile but
> then gives a slew of errors like this:
> 
> ./org/librdf/redland/core.java:13: cannot resolve symbol
> symbol  : class SWIGTYPE_p_librdf_world_s  
> location: class org.librdf.redland.core
>   public static SWIGTYPE_p_librdf_world_s librdf_new_world() {
>                 ^
> Is there some missing file that would define these SWIG types?

Very odd.  I can't say I use the Java interface much and
it is pretty alpha in 0.9.11.  There is a bit more in the
CVS and the tests did work, at least until recently.  SWIG
versions near 1.3.16 changed the way that the java/C interface
was done with a dumb shadow class that cannot be turned off.
I've got to figure out how to undo this mess.

> I also get this, and I don't see any org/librdf/redland/Hash.java :
> 
> skeleton.java:31: cannot resolve symbol
> symbol  : class Hash  
> location: package redland
> import org.librdf.redland.Hash;

Hash shouldn't be used by the Java API (or any of the other
higher level APIs).  It might be used in some internal
initialisation; what it is doing here, I don't know.

As you can work out, the Java API needs some help.

Dave












More information about the redland-dev mailing list