[jdom-interest] Problem with collection.List and jdom

Tim Sutton t.sutton at reading.ac.uk
Fri Oct 25 03:55:45 PDT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all

I am a java newbie so please forgive me if this is a dumb question :-)

I am trying to write a simple class that constructs an xml document using 
latest jdom (1.5 ?)  and sun jdk 1.4.1. During compilation I get the 
following error:

timServlet/DBXMLOutput.java [26:1] cannot access 
com.sun.java.util.collections.List

file com/sun/java/util/collections/List.class not found
        System.out.println(XMLOutputter.outputString(doc));
                                       ^
1 error
Errors compiling DBXMLOutput.


The relevant lines of code are: 


        Element root = new Element("myRootElement");
        Document doc = new Document();
        doc.setRootElement (root);
        root.setText("Hello World");
        System.out.println(XMLOutputter.outputString(doc)); //fails with 
collections.list not found


Can anyone tell me what I am doing wrong?

Thanks
        
- -- 
====================================================================
Tim Sutton
BiodiversityWorld Middleware Programmer
Centre for Plant Diversity & Systematics
School of Plant Sciences                         +44 (0)118-378-6052
The University of Reading                  	t.sutton [at] reading.ac.uk
READING RG6 6AS, UNITED KINGDOM    http://www.bdworld.org 
====================================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)

iD8DBQE9uSMxZxb+GYjbYHkRAj74AKCltpnY2pTx6UJo/y2FCzmN7i4RBgCgu01h
f/tpJp5PjtcfyLukiC2690E=
=/UBN
-----END PGP SIGNATURE-----




More information about the jdom-interest mailing list