Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

newbie help with SAX, jclark package not found

843834Oct 14 2002 — edited Oct 14 2002
I'm trying do a simple SAX exercise. My work files are on my d:\workspace\xml directory and I'm running win2k pro. I have extracted saxjava-1.0.zip to e:\XML\sax, the jdk to e:\j2sdk1.4.0, and james clark xp parser to e:\XML\xp
I have set my environment variables according to the book
variable: CLASSPATH
value: .;E:\XML\sax;E:\XML\xp\xp.jar

when I compile my java file I get the error:

package com.jclark.xml.sax does not exist
Parser parserObj = new com.jclark.xml.sax.Driver();
Note: BandReader.java uses or overrides a deprecated API
Note: Recompile with -deprecated for details
1 error

When I go into the directory E:\XML\xp\com\jclark\xml\sax , the file "Driver.java" is there
code in my BandReader.java file

import org.xml.sax.*;

public class BandReader extends HandlerBase  {
	public static void main(String[] args) throws Exception  {
		System.out.println("Here we go...");
		BandReader readerObj = new BandReader();
		readerObj.read();
	}
	public void read () throws Exception  {
		Parser parserObj = new com.jclark.xml.sax.Driver();
		parserObj.setDocumentHandler (this);
		parserObj.parse ("file:///d:/workspace/xml/bands.xml");
	}	
	public void startDocument() throws SAXException  {
		System.out.println("Starting...");
	}
	public void endDocument() throws SAXException  {
		System.out.println("...Finished");
	}
	public void startElement(String name, AttributeList atts) throws SAXException  {
		System.out.println("Element is " + name);
	}
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 11 2002
Added on Oct 14 2002
4 comments
218 views