Hi Tobias,

Descriptor engine relies on introspection to find classes implementing
certain (descriptor) interfaces.  Since  Java  Web Start mechanism for
loading classes is a bit different , this behaviour is not quite
unexpected.

Although I am not an author of it, I've struggled before with trying to
make Descriptor engine load classess from jars other than CDK / on the
default class path.  A (rough) workaround is to explicitly define the
descriptor class names in a list, but that's far from elegant.

Regards,
Nina

Tobias Girschick wrote:
> Hello,
>
> I have come across a  weird behaviour (or at least for me it seems
> weird) of the DescriptorEngine when I use it to calculate all
> available molecular descriptors for a set of Molecules.
> It normally works perfectly fine, but when I tried to use it within
> Java Webstart, it seems that it did not do anything.
>
> My code:
> DescriptorEngine engine = new
> DescriptorEngine(DescriptorEngine.MOLECULAR);
> // as long as we have molecules in the set
> while (it.hasNext()){
>     IAtomContainer ac = (IAtomContainer) it.next();
>     try{
>         engine.process(ac);
>     } catch (CDKException c)
>         c.printStackTrace();
>         logger.warning("problem with descriptor engine");
>     }
>        
>         Map<Object, Object> props = ac.getProperties(); 
>         Iterator<Object> iter = props.keySet().iterator();
>        
>         // for all calculated descriptors
>         while (iter.hasNext()){
>             Object obj_key = iter.next();
>             // for debugging
>             System.err.println("c"+ props.get(obj_key));
>         }
> ...
> }
>
> Normally the line System.err.println() in the end of the code snippet
> gives a lot of different stuff, e.g. References ....
> But if I wrap it in Java Webstart, the only property that is there is:
>
>     cCopyright Ak Gasteiger, University of Erlangen-Nuernberg, Germany
>
> Any idea what might be the problem? Shouldn't the engine tell me
> somehow if something didn't work?
>
> Thanks for your help in advance
> Regards,
> Tobias
>
>
> -- 
> Dipl.-Bioinf. Tobias Girschick
>
> Technische Universität München
> Institut für Informatik
> Lehrstuhl I12 - Bioinformatik
> Bolzmannstr. 3
> 85748 Garching b. München, Germany
>
> Room: MI 01.09.042
> Phone: +49 (89) 289-18002
> Email: tobias.girsch...@in.tum.de <mailto:tobias.girsch...@in.tum.de>
> Web: http://wwwkramer.in.tum.de/people/girschic
>         
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> ------------------------------------------------------------------------
>
> _______________________________________________
> Cdk-user mailing list
> Cdk-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdk-user
>   

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to