JAXP Tutorial?

Does anyone know of a good, simple online JAXP tutorial website? I just need something basic that will show me how to read from and add nodes to an XML document using JAXP.
This program will be part of a larger J2EE app of course.

Personally, I always suggest to read this : http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html, especially chapter 4 in your case. Simple and clear.

Similar Messages

  • String to XML Document

    Can anyone say how to transform a XML String to XML document
    (eg: String xmlstring="<root><main>Title</main></root>";
    How can I transform this to XML Document??
    Guhan

    Right, my mistake, this is what happens when you type code in a browser... hard to compile.
    Document XMLDoc=DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader("<root><main>Title</main></root&g t;")))PS. Consider following the online JAXP tutorial: http://java.sun.com/xml/tutorial_intro.html

  • Writing XML document using form values

    Being new to java/xml I'm strugling with this task:
    I have a web form and I need to pass the values from the form to a class that will then create an xml file using the form values.
    I've looked through the JAXP tutorial and Sun's XML tutorial but can't find anything that would suit my needs.
    Could anyone help me on how I should go about doing this?
    Does anyone have any sample code?

    with JAXP, you can either :
    - build a new XML document from scratch, using DOM, and append each node, each value,
    - create a style sheet that generates an XML document, receiving the web form values as parameters, processed with XSLT.

  • Html/xml coding help for SMIL

    We are just switching over to using Flash and I've got a
    Event URI but my hosting company is having trouble on how to show
    the player/stream on our webpage. Is there a sample I can show them
    for the below stream I've got out there?
    http://hwcdn.net/e7a4h6n3/fls/10403-Backstop.smil

    You could do this in a servlet. This is the general idea.
    1 Take the xml file that is suppose to be change and create a DOM representation. The following creates a
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.parse("myfile.xml");
    2 Then extract the request parameter names and there values and from the request name and value create a node. This node must match an element definition in the DTD of the xml that has been parsed into the DOM otherwise the xml will become invalid.
    Enumeration enum = req.getParameterNames();
    while(enum.hasMoreElements())
    String reqName = (String)enum.nextElement();
    String value = req.getParameter(reqName);
    //Construct an element from these values
    Element reqElement = document.createElement(reqName);
    Node reqValue = document.createTextNode(value);
    //Add the request value to the element
    reqElement.appendChild(reqValue);
    3 Then you will want to place this node in the correct part of the dom. I think you can search through the DOM for the correct node, and then add the node to the correct part of the tree e.g
    node.appendChild(reqElement);
    You will then have to revalidate the xml document.
    4 You can then write out the change xml file to disk using the transform method of javax.xml.Transform.Transformer to output a DOM to a text file. See the JAXP tutorial section using XSLT to do this.

  • XML DOM to Java object

    This is probably the wrong forum. I am trying to get up to speed with this fast. I looked at the JAXP tutorial but it does not help with this. (It does provide a quick tutorial on the Swing JTree, however ;-) ... )
    Anyway I can find any number of examples on displaying the entire DOM as a heirarchy, which I do not care about. I want to pull out parts of a DOM tree and create objects using the data (TEXT node values). I know this is a common task and I feel dumb but I am hoping to start somewhere better than the JAXP stuff ... maybe I'm wrong ...
    Can anyone please tell me where to get started learning ?
    Appreciate it !!!

    I am not sure if I am following what you are asking, but maybe this is worth a shot. If you want to just get specific values from an xml file (ie, elements or attributes) here is an example using the dom.
    Hope it helps
    DocumentBuilderFactory docBuildFactory = DocumentBuilderFactory.newInstance();
                            DocumentBuilder docBuilder = docBuildFactory.newDocumentBuilder();
                            Document doc = docBuilder.parse(new File(filename + "\\" + xml));                       
                            //get the root of the document which is the template name
                            doc.getDocumentElement().normalize();
                            String rootName =  doc.getDocumentElement().getNodeName();                       
                            //get elements of data needed
                            NodeList node1 = doc.getElementsByTagName("Memid");
                            Element element1 = (Element)node1.item(0);
                            memberid = element1.getFirstChild().getNodeValue();Sorry if this is not what you are looking for.....

  • I'm searching for an online-Tutorial for JAXP

    Hi folks!
    I'll work the first time with the JAXP-package and don't know how to handle it. Is there any useful tutorial in the web? I only want to use a parser to read and write xml-files in/from a JTextArea.
    Which parser is the best one for this kind of work? DOM, Xerces or Xalan?
    Thanks for your answers and greetings from Hamburg

    A very good tutorial of JAXP is available at
    http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/
    hope this helps.
    regards,
    Abhishek.

  • JWSDP-1.2 Tutorial chapter 9

    Hi all,
    Can anyone please show me the light?
    Im following the tutorial in the above chapter - it is pretty simple and straightforward, however I am getting this error.
    org.xml.sax.SAXParseException: XML declaration may only begin entities.
    at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)
    at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3170)
    at org.apache.crimson.parser.Parser2.maybePI(Parser2.java:966)
    at org.apache.crimson.parser.Parser2.maybeMisc(Parser2.java:1092)
    at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:487)
    at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
    at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
    at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:151)
    at Stylizer.main(Stylizer.java:62)
    The XML file is this...
    <?xml version="1.0"?>
    <ARTICLE>
    <TITLE>A Sample Article</TITLE>
    <SECT>The First Major Section
    <PARA>This section will introduce a subsection.</PARA>
    <SECT>The Subsection Heading
    <PARA>This is the text of the subsection.
    </PARA>
    </SECT>
    </SECT>
    </ARTICLE>
    The XSL file is....
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0"
    >
    <xsl:output method="html"/>
    <xsl:template match="/">
    <html><body>
    <xsl:apply-templates/>
    </body></html>
    </xsl:template>
    <xsl:template match="/ARTICLE/TITLE">
    <h1 align="center"> <xsl:apply-templates/> </h1>
    </xsl:template>
    <!-- Top Level Heading -->
    <xsl:template match="/ARTICLE/SECT">
    <h2> <xsl:apply-templates select="text()|B|I|U|DEF|LINK"/> </h2>
    <xsl:apply-templates select="SECT|PARA|LIST|NOTE"/>
    </xsl:template>
    <!-- Second-Level Heading -->
    <xsl:template match="/ARTICLE/SECT/SECT">
    <h3> <xsl:apply-templates select="text()|B|I|U|DEF|LINK"/> </h3>
    <xsl:apply-templates select="SECT|PARA|LIST|NOTE"/>
    </xsl:template>
    <!-- Third-Level Heading -->
    <xsl:template match="/ARTICLE/SECT/SECT/SECT">
    <xsl:message terminate="yes">Error: Sections can only be nested 2 deep.</xsl:message>
    </xsl:template>
    <!-- Paragraph -->
    <xsl:template match="PARA">
    <p><xsl:apply-templates/></p>
    </xsl:template>
    </xsl:stylesheet>
    The Java code is...
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.FactoryConfigurationError;
    import javax.xml.parsers.ParserConfigurationException;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.w3c.dom.Document;
    import org.w3c.dom.DOMException;
    // For write operation
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.transform.stream.StreamResult;
    import java.io.*;
    public class Stylizer
    // Global value so it can be ref'd by the tree-adapter
    static Document document;
    public static void main (String argv [])
    if (argv.length != 2) {
    System.err.println ("Usage: java Stylizer stylesheet xmlfile");
    System.exit (1);
    DocumentBuilderFactory factory =
    DocumentBuilderFactory.newInstance();
    //factory.setNamespaceAware(true);
    //factory.setValidating(true);
    try {
    File stylesheet = new File(argv[0]);
    File datafile = new File(argv[1]);
    DocumentBuilder builder = factory.newDocumentBuilder();
    document = builder.parse(datafile);
    // Use a Transformer for output
    TransformerFactory tFactory =
    TransformerFactory.newInstance();
    StreamSource stylesource = new StreamSource(stylesheet);
    Transformer transformer = tFactory.newTransformer(stylesource);
    DOMSource source = new DOMSource(document);
    StreamResult result = new StreamResult(System.out);
    transformer.transform(source, result);
    } catch (TransformerConfigurationException tce) {
    // Error generated by the parser
    System.out.println ("\n** Transformer Factory error");
    System.out.println(" " + tce.getMessage() );
    // Use the contained exception, if any
    Throwable x = tce;
    if (tce.getException() != null)
    x = tce.getException();
    x.printStackTrace();
    } catch (TransformerException te) {
    // Error generated by the parser
    System.out.println ("\n** Transformation error");
    System.out.println(" " + te.getMessage() );
    // Use the contained exception, if any
    Throwable x = te;
    if (te.getException() != null)
    x = te.getException();
    x.printStackTrace();
    } catch (SAXException sxe) {
    // Error generated by this application
    // (or a parser-initialization error)
    Exception x = sxe;
    if (sxe.getException() != null)
    x = sxe.getException();
    x.printStackTrace();
    } catch (ParserConfigurationException pce) {
    // Parser with specified options can't be built
    pce.printStackTrace();
    } catch (IOException ioe) {
    // I/O error
    ioe.printStackTrace();
    } // main
    Apparently the above error is usually generated when the XML declaration is not the first thing in the XML file, however that is not the case in the above file.
    Any one with any ideas, guidance, links etc..?
    Any help will be greatly appreciated!!
    Kind Regards.

    The only thing I can think of is to check the encoding of the XML file. If it is encoded with UTF-16 or something like that it would give you that kind of error.

  • Urgent help on JAXP

    First of all please forgive me as my question may be a newbie question. I am very new to these parsers and really has no clue at all on how they actually work. Now i need some explanations and some help. First, i will like to know where can i download JAXP and which version should i use.
    Next, lets say now i have a XML document, i will like to link it to a servlet in a webserver (i am using Apache Tomcat 4.0) and then to the MIDP (The MIDP i already establised a link to the servlet). Now, i would like to know are my steps correct? And also i would like to know in detail, how do i use the JAXP to link the XML document with my servlet.
    Another question is, when i link my MIDP to the servlet, i found out that it runs with a parser named kxml, what does this kxml do? Since i think it support the SAX, is this a parser that can also use to parse the xml document to the servlet?
    Thanks in advance

    Download JAXP here (in the JWSDP) : http://java.sun.com/webservices/downloads/webservicespack.html
    Tutorial :
    http://java.sun.com/webservices/docs/1.3/tutorial/doc/index.html
    But there is an other solution. You can use JAXB and generate class java for reading the xml without using SAX or DOM or ...
    Bye :)

  • Buiding xml file using SAX parser of JAXP

    Please send me xml building using the sax parser.This is the urgent requirement ,iam not geeting how to solve this problem.so please anybody can help with one best example

    You don't build an XML file with a parser. A parser reads an XML file and converts it to some internal representation. Try reading this tutorial:
    http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/

  • Problem getting Count Of ChildNodes (JAXP)

    I am trying to process an XML Document like
    <Report siteID="1234567">
    <Transaction transactionDetail="VFVF56760482" referenceNumber="32293642" date="09-01-2003 09:30 AM">
    <Item modelNo="" serialNo="" quantity="1" price="250.00" total="250.00" description="Rayban Sun Glasses 1" />
    </Transaction>
    </Report>
    Once i get the Main Node ("Transaction") using
    int nodeLen=0;
    NodeList nList = doc.getElementsByTagName("Transaction");
    nodeLen = nList.getLength();
    for(int i=0; i<nodeLen ;i++){
         Node n = nList.item(i);
         NamedNodeMap nnm = n.getAttributes();
         int attrItems = nnm.getLength();
    //Below is where the problem is..
    System.out.println("ChildNodes:"+ n.getChildNodes().getLength());
    n.getChildNodes.getLength = 3 , there is only one ChildNode for Transaction1 Node.
    Is this a bug in JAXP or am i missing something?
    Appreciate any Help
    Thanks
    Joe Eugene

    n.getChildNodes() includes ignorableWhitespace text
    nodes.
    Refer to
    http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/dom
    2b_display.htmlThanks for your reply...
    Is there a way to get the correct count of ChildNodes?
    Thanks,
    Joe Eugene

  • Stuck with the jwdsp1-1 web services tutorial

    I'm busy trying to complete this tutorial:
    http://java.sun.com/webservices/docs/1.1/tutorial/doc/JAXRPC.html#wp72279
    but at the stage of
    'Compiling the Service Definition Code
    To compile HelloIF.java and HelloImpl.java, go to the <JWSDP_HOME>/docs/tutorial/examples/jaxrpc/hello directory and type the following:
    ant compile-server
    I get stuck since i get a lot NoClassDefFoundErrors. Before I reached this stage I executed all previous steps and the only thing I figure that could be wrong is the path variables that need to be set, as stated earlier in the tutorial.
    Nevertheless i get exceptions in totally different and some non-existent directories:
    C:\jwsdp-1.1\docs\tutorial\examples\jaxrpc\hello>ant compile-server
    Exception in thread "main" java.lang.NoClassDefFoundError: Files\j2sdk1/4/1_01\lib\tools/jar;C:\jwsdp-1/1\jakarta-ant-1/5/1\//\server\lib\catalina-ant/jar;C:\jwsdp-1/1\jakarta-ant-1/5/1\//\jaxp-1/2/2\lib\jaxp-api/jar;C:\jwsdp-1/1\jakarta-ant-1/5/1\//\jaxp-1/2/2\lib\endorsed\xsltc/jar;C:\jwsdp-1/1\jakarta-ant-1/5/1\//\jaxp-1/2/2\lib\endorsed\xercesImpl/jar;C:\jwsdp-1/1\jakarta-ant-1/5/1\//\jaxp-1/2
    /2\lib\endorsed\xalan/jar;C:\jwsdp-1/1\jakarta-ant-1/5/1\//\jaxp-1/2/2\lib\endorsed\sax/jar;C:\jwsdp-1/1\jakarta-ant-1/5/1\//\jaxp-1/2/2\lib\endorsed\dom/jar;C:\jwsdp-1/1\jakarta-ant-1/5/1\lib\optional/jar;C:\jwsdp-1/1\jakarta-ant-1/5/1\lib
    \ant/jar;c:\jwsdp-1/1\bin; c:\jwsdp-1/1\jwsdp-shared\bin; c:\jwsdp-1/1\jaxrpc-1/0/3\bin; c:\jwsdp-1/1\jakarta-ant-1/5/1\bin
    This is the total error message i get when executing the command: ant compile-server
    Could anyone help me out here since I have no clue on how to solve this.
    Thanks

    I created a .bat file, rather than set environment variables. I called it set-env.bat, and it looked like this:
    set path=c:\Programming\Java\j2sdk1.4.1_03\bin;%path%
    set path=c:\Programming\Java\jwsdp-1.1\bin;%path%
    set path=c:\Programming\Java\jwsdp-1.1\jwsdp-shared\bin;%path%
    set path=c:\Programming\Java\jwsdp-1.1\jaxrpc-1.0.3\bin;%path%
    set path=c:\Programming\Java\jwsdp-1.1\jakarta-ant-1.5.1\bin;%path%
    Enter these lines in a text editor and save them as "set-env.bat" as a text file in your root directory (c:). Then start a DOS prompt (Start-Programs-Accessories-Command Prompt) and at the prompt type "set-env" (without the quotes). Then you can go to the directory where your examples are located and follow the directions in the tutorial.

  • Jaxa xml tutorials, does anyone have some tutorial for using xml in java??

    jaxa xml tutorials, does anyone have some tutorial for using xml in java??
    can be dom,sax,jaxp whatever....
    i try to find in google but din't find any complete one....

    dapim wrote:
    jaxa xml tutorials, does anyone have some tutorial for using xml in java??
    can be dom,sax,jaxp whatever....
    i try to find in google but din't find any complete one....I would imagine anyone here would just produce the same set of hits that you did, so why waste our time doing it only to direct you to the same one(s) you already found and rejected.

  • Having problem compiling JAXP - SAX example

    I am new to this technology. I am trying to run all the examples which are in JWSDP1.1. Can anybody tell How to solve the following error.
    C:\jwsdp-1.1\docs\tutorial\examples\jaxp\sax\samples>javac Echo01.java
    Echo01.java:74: cannot resolve symbol
    symbol : method parse (java.io.File,org.xml.sax.helpers.DefaultHandler)
    location: class javax.xml.parsers.SAXParser
    saxParser.parse( new File(argv[0]), handler);
    ^
    1 error

    In the command line include these files:
    sax.jar
    jaxp-api.jar
    I mean like this :
    javac -classpath ......\sax.jar;.....\jaxp-api.jar Echo01.java

  • JMS tutorial

    I was trying "Writing the PTP Client Programs " in the tutorial section, i compiled SimpleQueueSender.java,SimpleQueueReceiver.java in one window and started j2ee -verbose in another window.Then, "j2eeadmin -addJmsDestination MyQueue queue".after this as per tutorial i executed "java -Djms.properties=%J2EE_HOME%\config\jms_client.properties SimpleQueueSender MyQueue 3".I have all my classpath and path set as per tutorial, but i'm getting a serious of errors as foillows ::::::::::::::::::::::::
    Queue name is MyQueue
    WARNING : modify your java command line to include the -Djava.endorsed.dirs option
    XML Error line : 17 Element type "connector" is not declared.
    XML Error line : 18 Attribute "xmlns" is not declared for element "connector".
    XML Error line : 19 Attribute "xmlns:xsi" is not declared for element "connector".
    XML Error line : 21 Attribute "xsi:schemaLocation" is not declared for element "connector".
    XML Error line : 21 Attribute "version" is not declared for element "connector".
    XML Error line : 22 Element type "description" is not declared.
    XML Error line : 23 Element type "display-name" is not declared.
    XML Error line : 24 Element type "icon" is not declared.
    XML Error line : 25 Element type "vendor-name" is not declared.
    XML Error line : 26 Element type "eis-type" is not declared.
    XML Error line : 27 Element type "resourceadapter-version" is not declared.
    XML Error line : 32 Element type "resourceadapter" is not declared.
    XML Error line : 33 Element type "resourceadapter-class" is not declared.
    XML Error line : 34 Element type "outbound-resourceadapter" is not declared.
    XML Error line : 35 Element type "connection-definition" is not declared.
    XML Error line : 36 Element type "managedconnectionfactory-class" is not declared.
    XML Error line : 39 Element type "config-property" is not declared.
    XML Error line : 40 Element type "config-property-name" is not declared.
    XML Error line : 41 Element type "config-property-type" is not declared.
    XML Error line : 51 Element type "connectionfactory-interface" is not declared.
    XML Error line : 54 Element type "connectionfactory-impl-class" is not declared.
    XML Error line : 57 Element type "connection-interface" is not declared.
    XML Error line : 60 Element type "connection-impl-class" is not declared.
    XML Error line : 93 Element type "transaction-support" is not declared.
    XML Error line : 94 Element type "authentication-mechanism" is not declared.
    XML Error line : 95 Element type "authentication-mechanism-type" is not declared.
    XML Error line : 98 Element type "credential-interface" is not declared.
    XML Error line : 102 Element type "reauthentication-support" is not declared.
    XML Error line : 104 Element type "inbound-resourceadapter" is not declared.
    XML Error line : 105 Element type "messageadapter" is not declared.
    XML Error line : 106 Element type "messagelistener" is not declared.
    XML Error line : 107 Element type "messagelistener-type" is not declared.
    XML Error line : 110 Element type "activationspec" is not declared.
    XML Error line : 111 Element type "activationspec-class" is not declared.
    XML Error line : 118 Element type "adminobject" is not declared.
    XML Error line : 119 Element type "adminobject-interface" is not declared.
    XML Error line : 121 Element type "adminobject-class" is not declared.
    XML Error line : 131 Element type "config-property-value" is not declared.
    WARNING : modify your java command line to include the -Djava.endorsed.dirs option
    JNDI API lookup failed: javax.naming.CommunicationException: com.sun.enterprise.resource.PoolingException
         at com.sun.enterprise.naming.factory.JavaAppClientObjectHandler.createConnectionFactory(JavaAppClientObjectHandler.java:194)
         at com.sun.enterprise.naming.factory.ConnectorObjectFactory.getObjectInstance(ConnectorObjectFactory.java:89)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:124)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at SimpleQueueSender.main(SimpleQueueSender.java:101)
    Caused by: java.lang.ClassNotFoundException: com.sun.jms.connector.ra.JMSManagedQueueConnectionFactory
         at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:217)
         at com.sun.enterprise.naming.factory.JavaAppClientObjectHandler.createConnectionFactory(JavaAppClientObjectHandler.java:179)
         ... 5 more
    what do i do???

    I promise, this is the last post of this thing.
    This should get rid of all the errors:
    WARNING : modify your java command line to include the -Djava.endorsed.dirs option
    Error: JAXP SAXParser property not recognized:
    ..xml.. errors
    etc.etc..
    Just to lay it all out, here is how to "run" the code.. the compiling is a breeze. So, this is only how to generically get things to run. Specific of *nix, but I'm sure windows users can pick-out the important parts.
    #!/bin/sh
    J2EE_HOME=/usr/local/j2sdkee1.4
    # this assumes your PATH already points to the following: (the j2ee goodies listed below)
    # $J2EE_HOME/lib/j2ee.jar
    # $J2EE_HOME/lib/system/jmsra.jar
    # and of course... the standard java libs.
    #below the ~/code/w3track/jms1.0.2b/src/ is the
    #directory where I manually compiled #The jms libraries in...
    #this could instead point to the jms.jar file in the lib directory.
    p=$PATH:$J2EE_HOME/lib/j2ee.jar:$J2EE_HOME/lib/system/jmsra.jar:~/code/w3track/jms1.0.2b/src/:.
    [ "$1" != "" ] && java -server -Djava.endorsed.dirs=$J2EE_HOME/lib/endorsed -classpath $p $1
    # first setup the queue, I'll assume you have
    #started a jms queue by first starting the
    # j2ee -startRegistry and
    # j2eeadmin -addJmsDestination q1des queue
    #example of running: ./<this_script> "SendToQueue q1des 5"
    #this will send 5 messages into the queue.
    #hope this helps some people out there
    #who are having issues getting the compiled
    #code to run. Good Luck!
    # Chris Danielson

  • Error when compiling the J2ee tutorial source files

    HI,
    I have installed ant, j2ee tomcat-3.2.2 and jdk1.3 and when i tried to compile the source file downloaded from java.sun by
    ant converter, it prompted
    "Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/main"
    I am running it on win98 with the autoexec.bat containing the followings:
    set J2EE_HOME=c:\j2sdkee1.3
    set JAVA_HOME=c:\jdk1.3.1
    set ANT_HOME=c:\jakarta-ant-1.3
    set TOMCAT_HOME=c:\tomcat\jakarta-tomcat-3.2.2
    set classpath=;.;c:\jdk1.3.1\jre\lib\rt.jar;c:\j2sdkee1.3\lib\j2ee.jar;c:\jaxp\xalan.jar;c:\jaxp\crimson.jar;c:\jaxp\jaxp.jar;c:\C:\jakarta-ant-1.3\lib\ant.jar;C:\jakarta-ant-1.3\lib\jaxp.jar;C:\jakarta-ant-1.3\lib\parser.jar
    PATH=%PATH%;"C:\Program Files\Mts";C:\PROGRA~1\ULTRAE~1;c:\jdk1.3.1\bin;c:\j2sdkee1.3\bin;c:\jakarta-ant-1.3\bin;C:\PROGRA~1\MICROS~4\80\TOOLS\BINN
    Really thx for help !!!!

    Hi.
    I am compiling the sample converter.ear downloaded from
    the j2ee tutorial bundle form java.sun. I am using jakarta-ant-1.4alpha-bin.zip downloaded from jakarta
    oh..yes it should be org.apache.tools.ant.Main ....sorryfor typo.....
    look forward to any helpful reply

Maybe you are looking for

  • Icon Stuck in Top Left Corner of Screen

    I have an icon of some sorts stuck in the top left hand corner of my screen. It's not really an icon, it's a tiny box and it was a box with a folder icon inside and when I would click on the folder it would show me the contents. Than I deleted the fo

  • In flex charts the label for next month get dropped

    I found for DatatTimeAxis if you set disabledRanges to the last date of the month the label for next month gets dropped using property labelUnits='months". Any ideas? Below is the code: <?xml version="1.0"?> <!-- Simple example to demonstrate the Dat

  • External monitor randomly loses signal

    Hello, I have a external monitor connected via a DVI-D/Mini Displayport cable, and maybe once or twice a week the monitor will all of a sudden lose signal. The only way to regain the signal to the monitor is to unplug the cable from my MacbookPro. Ha

  • Software protection for Mac OS X

    Reading discussion on http://www.networkworld.com/news/2009/041709-first-mac-os-x-botnet.html?page=1 makes me believe that I need to have a software protection. Can somebody indicate me a software to keep my MBP protected (OS X, Snow Leopard). Thanks

  • HD space disapearing quickly.. but can't figure out why

    I have had this MBP for about two months. And even though I have put a few small programs on it(plus Call of Duty 2), I have also deleted certain things such as the Office Trial, and numerous other programs. I have even put a good chunk of my iTunes