Exception in thread "Thread-0"
From: thufir (thufir.hawat_at_mail.com)
Date: 01/23/05
- Next message: SD: "Re: What happened? My "https applets" stopped working"
- Previous message: Jürgen Scheffler: "http header f=FCr download"
- Next in thread: Tor Iver Wilhelmsen: "Re: Exception in thread "Thread-0""
- Reply: Tor Iver Wilhelmsen: "Re: Exception in thread "Thread-0""
- Reply: klynn47_at_comcast.net: "Re: Exception in thread "Thread-0""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 23 Jan 2005 13:47:23 -0800
What does this error mean, please?
I don't know if it's due to how packages and classpath are being used
with javac and java, or if it's the code itself.
///////////////////command line//////////////////
C:\>
C:\>javac @comp
C:\>java -classpath C:\java\classes\ atreides.jtidy.TidyTest
Exception in thread "Thread-0" java.lang.NoClassDefFoundError:
org/w3c/tidy/Tidy
at atreides.jtidy.TidyTest.run(TidyTest.java:33)
at java.lang.Thread.run(Unknown Source)
C:\>type comp
-d C:\java\classes\
-g
-sourcepath C:\java\sources\
-classpath .;C:\java\classes\;C:\java\classes\org\w3c\tidy\Tidy.jar
C:\java\sources\atreides\jtidy\TidyTest.java
C:\>type C:\java\sources\atreides\jtidy\TidyTest.java
package atreides.jtidy;
import java.io.IOException;
import java.net.URL;
import java.io.BufferedInputStream;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.io.FileWriter;
import org.w3c.tidy.Tidy;
public class TidyTest implements Runnable {
private String url;
private String outFileName;
private String errOutFileName;
private boolean xmlOut;
public TidyTest(String url, String outFileName,
String errOutFileName, boolean xmlOut)
{
this.url = url;
this.outFileName = outFileName;
this.errOutFileName = errOutFileName;
this.xmlOut = xmlOut;
}
public void run()
{
URL u;
BufferedInputStream in;
FileOutputStream out;
Tidy tidy = new Tidy();
tidy.setXmlOut(xmlOut);
try {
tidy.setErrout(new PrintWriter(new
FileWriter(errOutFileName),
true));
u = new URL(url);
in = new BufferedInputStream(u.openStream());
out = new FileOutputStream(outFileName);
tidy.parse(in, out);
}
catch ( IOException e ) {
System.out.println( this.toString() + e.toString() );
}
}
public static void main( String[] args ) {
String url = "http://www.google.com/";
String output = "output.txt";
String errorLog = "errorLog.txt";
TidyTest t1 = new TidyTest(url,output,errorLog,true);
Thread th1 = new Thread(t1);
th1.start();
}
}
C:\>
Thanks,
Thufir Hawat
- Next message: SD: "Re: What happened? My "https applets" stopped working"
- Previous message: Jürgen Scheffler: "http header f=FCr download"
- Next in thread: Tor Iver Wilhelmsen: "Re: Exception in thread "Thread-0""
- Reply: Tor Iver Wilhelmsen: "Re: Exception in thread "Thread-0""
- Reply: klynn47_at_comcast.net: "Re: Exception in thread "Thread-0""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|