From: richard a. <ric...@ya...> - 2006-11-07 05:10:24
|
Hi Geoff, What a coincidence! In looking through the Java that your openbabel-java.i file generated (svn trunk rev 1584), I see the cause of the large filenames. The %module directive uses net.sourceforge.openbabel as the name. Change this to: %module openbabel The problems with long filenames will disappear. But that's not the biggest problem. The autogenerated java also wouldn't compile because it was defining things like: public interface net.sourceforge.openbabelJNI { ... } when it really should have been generating: package net.sourceforge.openbabel; public interface JNI { ... } and so on. Packages are more of a hassle than they're worth at this point. We can always get that part tidied up later. So when I run swig with the '%module openbabel' directive, I get to the same place I was before. That is, 32 java compile errors are produced. They involve these class definitions that can't be found: OBBitVec matrix3x3 OBAromaticTyper OBAtomTyper OBChainsParser In addition, 2 of these errors are apparently related to method duplication: OBSmartsPattern.java:107: RestrictedMatch(OBMol,SWIGTYPE_p_std__vectorTstd__pairTint_int_t_t,boolean) is already defined in OBSmartsPattern public boolean RestrictedMatch(OBMol mol, OBBitVec bv, boolean single) { ... OBSmartsPattern.java:111: RestrictedMatch(OBMol,SWIGTYPE_p_std__vectorTstd__pairTint_int_t_t) is already defined in OBSmartsPattern public boolean RestrictedMatch(OBMol mol, OBBitVec bv) { ... cheers, Rich --- Geoffrey Hutchison <ge...@ge...> wrote: > > On Nov 5, 2006, at 9:03 PM, richard apodaca wrote: > > > I know Java is technically not a scripting > language, > > but I was wondering if anyone was interested in > trying > > to get a Java interface to OB working. > > Actually, there are SWIG generated files for Java in > the current SVN > head (much like you describe). > > I had to do some renaming though -- the filenames > are so huge that > they can't be archived by tar (i.e., for generating > snapshots and > releases). I haven't updated the Makefile to do this > automatically yet. > > > (6) on line 1 of openbabel_java.cpp, add #include > > <math.h> > > Actually, you can automate this by adding to > openbabel-java.i > > > [produces 32 errors about missing classes such as > > OBChainsParser, OBBitVec, matrix3x3, > OBAromaticTyper, > > and so on.] > > If you can get me a full list, I'll definitely hack > the SWIG > interface file to generate these. > > Cheers, > -Geoff > ____________________________ Richard Apodaca Blog: http://depth-first.com ____________________________________________________________________________________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail. http://new.mail.yahoo.com |