Re: [java-list] Classpath - XML

2002-08-30 Por tôpico Jose Carlos

Copie os jar para %java_home%\jre\lib\ext , irá resolver.
- Original Message -
From: Ronaldo Cunda [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 28, 2002 3:13 PM
Subject: [java-list] Classpath - XML


Galera, o negócio é o seguinte...

Estou começando agora a utilizar XML com Java e estou com um probleminha.

Estou utilizando como parser XML o Xerces http://xml.apache.org. E a API
é a JDOM http://www.jdom.org.

Já adicionei os .jar no meu classpath e compilo sem problema a classe. Mas
quando vou executar, dá o seguinte erro...

Exception in thread main java.lang.NoClassDefFoundError:
org/jdom/JDOMException

Alguém tem idéia do que pode ser, já que o compilador encontra essa classe,
mas não executa exatamente por não encontrar a classe (acho eu...)

Agradeço pela ajuda!

Ronaldo



A busca mais veloz e precisa da internet. Acesse agora:
http://www.zoom.com.br.



-- LISTA SOUJAVA 
http://www.soujava.org.br  -  Sociedade de Usuários Java da Sucesu-SP
dúvidas mais comuns: http://www.soujava.org.br/faq.htm
regras da lista: http://www.soujava.org.br/regras.htm
historico: http://www.mail-archive.com/java-list%40soujava.org.br
para sair da lista: envie email para [EMAIL PROTECTED]
-


-- LISTA SOUJAVA  
http://www.soujava.org.br  -  Sociedade de Usuários Java da Sucesu-SP 
dúvidas mais comuns: http://www.soujava.org.br/faq.htm
regras da lista: http://www.soujava.org.br/regras.htm
historico: http://www.mail-archive.com/java-list%40soujava.org.br
para sair da lista: envie email para [EMAIL PROTECTED] 
-




Re: [java-list] Classpath - XML

2002-08-30 Por tôpico Roberto Hideki

Nos FAQs (www.jdom.org/docs/faq.html) do JDOM tem o seguinte:


I tried to use JDOM and get an error like this:

java.lang.NoSuchMethodError
 orjava.lang.NoClassDefFoundError:
org/xml/sax/SAXNotRecognizedException
What's wrong?

You need to ensure that the xerces.jar file supplied with the JDOM download
is in your classpath before any other XML classes, such as those that come
with JAXP or Crimson. These other XML libraries, as well as older versions
of Apache Xerces, support DOM Level 1 and SAX 1.0, not the required DOM
Level 2 and SAX 2.0. The result is an exception being thrown. Check your
classpath, and try again. If the classpath looks OK, the problematic JAR
might also be hiding in the system's standard extension directory (see the
following).

What do you mean Standard extension directory?

The standard extension directory is a directory containing JAR files that is
searched automatically by the Java runtime and compiler. If you've installed
the JDK (not the just the JRE) you may well have two separate ext
directories, one of which is used for compiling (typically somewhere like
C:\jdk1.3\jre\lib\ext) and the other of which is used for running code
(typically somewhere like C:\Program Files\JavaSoft\jre\1.3\lib\ext). The
wrong JAR file in either directory can get in your way (though at different
times). Furthermore, the right JAR file has to be in both directories.


Roberto Tatemoto


 Galera, o negócio é o seguinte...

 Estou começando agora a utilizar XML com Java e estou com um probleminha.

 Estou utilizando como parser XML o Xerces http://xml.apache.org. E a API
 é a JDOM http://www.jdom.org.

 Já adicionei os .jar no meu classpath e compilo sem problema a classe. Mas
 quando vou executar, dá o seguinte erro...

 Exception in thread main java.lang.NoClassDefFoundError:
org/jdom/JDOMException

 Alguém tem idéia do que pode ser, já que o compilador encontra essa
classe,
 mas não executa exatamente por não encontrar a classe (acho eu...)




-- LISTA SOUJAVA  
http://www.soujava.org.br  -  Sociedade de Usuários Java da Sucesu-SP 
dúvidas mais comuns: http://www.soujava.org.br/faq.htm
regras da lista: http://www.soujava.org.br/regras.htm
historico: http://www.mail-archive.com/java-list%40soujava.org.br
para sair da lista: envie email para [EMAIL PROTECTED] 
-