Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Exception in thread "main" java.lang.NoClassDefFoundError:

Reply
Thread Tools

Exception in thread "main" java.lang.NoClassDefFoundError:

 
 
dave
Guest
Posts: n/a
 
      07-16-2004
(Forgive all caps... they are there to differentiate btw question and code)

THIS IS THE ERROR I KEEP GETTING. IT COMPILES BUT WHEN IT RUNS, THE
FOLLOWING POPS UP:
Exception in thread "main" java.lang.NoClassDefFoundError: PlayClip

THIS IS MY CODE:
import java.applet.*;
import java.io.*;
import java.net.*;

public class PlayClip {
public static void main(String args[]) throws Exception{
if(args.length == 0){
System.err.println("Specify file name to play");
System.exit(-1);
}
File file = new File(args[0]);
URL url = file.toURL();
AudioClip clip = Applet.newAudioClip(url);
clip.loop();
//Wait 30 seconds
Thread.sleep(30000);
System.exit(0);
}
}

THIS IS MY SYSTEM SETTINGS, ENVIR VAR"S ETC.
SET PATH=C:\j2sdk1.4.2_05\bin;
SET
CLASSPATH=C:\j2sdk1.4.2_05\bin;c:\jakarta-tomcat-5.0.25\common\lib\servlet-a
pi.jar
SET JAVA_HOME=C:\j2sdk1.4.2_05
SET TOMCAT_HOME=c:\jakarta-tomcat-5.0.25
SET CATALINA_HOME=c:\jakarta-tomcat-5.0.25

ANY IDEA WHY THIS IS HAPPENING? I CAN AND IN FACT ARE RUNNING AND COMPILING
SREVLETS TO TOMCAT...



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.720 / Virus Database: 476 - Release Date: 7/14/04


 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      07-16-2004
On Fri, 16 Jul 2004 12:41:13 GMT, dave wrote:

> (Forgive all caps... they are there to differentiate btw question and code)


<code>
....
</code>

Might be a better way than shouting.

> Exception in thread "main" java.lang.NoClassDefFoundError: PlayClip


This sounds like a very noobish error, are
you using an IDE to compile and launch? What
are the exact commands you are using to both
compile and launch the application?

[ BTW - did you try..

java -cp . PlayClip

]

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      07-16-2004
On Fri, 16 Jul 2004 12:41:13 GMT, "dave"
<(E-Mail Removed)> wrote or quoted :

>Exception in thread "main" java.lang.NoClassDefFoundError: PlayClip


see http://mindprod.com/jgloss/errormess...SDEFFOUNDERROR

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exception of type 'System.Web.HttpUnhandledException' wasthrown.Exception has been thrown by the target of an invocation.System.WebSystem.Exception jobs ASP .Net 1 11-16-2007 05:57 PM
while executing my client program i get the exception javax.naming.LinkException: [Root exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining if plz anybody know how to solve this problem then mahesh Java 0 03-08-2007 12:26 PM
Terminating a thread from the main thread Charles A. Lackman ASP .Net 3 12-09-2004 02:12 PM
"Thread was being aborted" error from WebApp using Thread.Sleep. Stephen Miller ASP .Net 3 07-01-2004 11:50 PM
perl 5.8.2/3 - thread started by a thread pawo Perl 0 02-16-2004 01:18 PM



Advertisments