[jdom-interest] conflicting List class

J. Albers jalbers at cs.uu.nl
Thu Jan 22 05:21:20 PST 2004


This problem has been mentioned a few time, but i didn't find an answer that could help me. I get the following error message
when compiling the class with the method mentioned below.

- cannot find definition for class 'java.util.List'

The solutions i heard sofar had something to do with java 1.1 versus java 2.
As far as i know i'm using JDK 1.4 to compile the JDOM package. And i use Visual J++ for my programm compiling.

Doe anyone know how to solve this?

import java.util.*

private void listElements(Element e) 
  System.out.println("*Element, name:" + e.getName() + 
   ", text:" + e.getText()) ;

  //List all attributes
  List as = e.getAttributes();
  for (Iterator i = as.iterator();i.hasNext();) 
   Attribute a = (Attribute)i.next();
   System.out.println("*Attribute, name:" + a.getName() + 
    ", value:" + a.getValue()) ;
  //List all children
  List c = e.getChildren();
  for (Iterator i = c.iterator();i.hasNext();) 
   Element n = (Element)i.next();

Thanks, Joachim Albers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20040122/5b3367c0/attachment.htm

More information about the jdom-interest mailing list