[jdom-interest] Problems with getChildren() and java.util.List

Ian Lea ian at digimem.net
Tue Sep 17 03:32:52 PDT 2002


There was stuff on the list about this a week or so back.

Summary: make sure you use the java 1.2+ versions of
everything and lose all references to collections.jar
and java 1.1.


--
Ian.
ian at digimem.net

> steffen.volz at ifp.uni-stuttgart.de (Steffen Volz) wrote 
>
> Trying to compile the following code
> 
> -------------------------
> import org.jdom.*;
> import org.jdom.output.*;
> import org.jdom.input.*;
> import java.io.*;
> import java.util.*;
> ...
> Element root = doc.getRootElement();
> List children = root.getChildren();
> ...
> -------------------------
> 
> I get this error:
> 
> Test.java:66: incompatible types
> found   : com.sun.java.util.collections.List
> required: java.util.List
>                         List children = element.getChildren();
> 
> I have tried to figure out the reason, but I didn't find any helpful replies that were being sent to people having the same problem.
> 
> I'm using sdk 1.4.0 and jdomb8. There is no other sdk installed on my machine.
> 
> Does anyone show me the way?
> 
> Thanks in advance,
> 
> Steffen
> 
----------------------------------------------------------------------
Searchable personal storage and archiving from http://www.digimem.net/


More information about the jdom-interest mailing list