(GIMME) wrote in message news:<. com>...
> org.jdom.Content is in jdom.jar.
>
> Note that this class does not exist in some previous versions of jdom.jar
> (for example the version which comes with b8 which I just checked).
>
> Personally, I wouldn't store jdom.jar in jdk\jre\lib\endorsed. Make
> certain your CLASSPATH is pointing to a valid jdom.jar file.
Hello!
I have the same problem as Bernd Oninger, I can compile but not run
the program.
Im trying to make this simple example to work...
---- example1.java ----
import org.jdom.*;
public class example1
{
public static void main(String[] args)
{
Element root = new Element("myRootElement");
Document doc = new Document(root);
root.setText("This is a root element");
System.out.println(doc);
}
}
-----------------------
To compile I use this:
>javac example1.java -classpath "jdom.jar"
....it works great since i have the jdom.jar-file in the same directory
(I asume that you can have the jar-file anywhere you want, as long as
the path is correct).
But when I run the program I get this:
>java example1 -classpath "jdom.jar"
Exception in thread "main" java.lang.NoClassDefFoundError:
org/jdom/Element
at example1.main(example1.java:7)
....why wont this work???
GIMME, when you are talking about the CLASSPATH do you mean the
enviroment variable (NOTE: Im using windows here, not linux)??? I have
tryed "set CLASSPATH ..." but its still the same problem.
THX in advance
/Richard