File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes runtime error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "runtime error" Watch "runtime error" New topic

runtime error

lokesh rajarathnam
Ranch Hand

Joined: May 17, 2007
Posts: 35
Hello all,

i'm trying interface but the following coad make error
" Exception in thread "main" java.lang.NoclassDefFoundError: Test "
any one can help from this hurdeal

interface Bounceable {

void bounce();
void setBounceFactor(int bf);

class Tire implements Bounceable {

public void bounce(){

System.out.println(" defaultly this method will be abstract and public");

public void setBounceFactor(int p) {
System.out.println(" what ever access specifier in interface but in implement it will be public");

class Test {
public static void main (String args[]){

Bounceable oB= new Tire();
Bob Ruth
Ranch Hand

Joined: Jun 04, 2007
Posts: 320
Look at the class that implements main().
What can you see about it's "visibility" that might get in the way such that the JVM can't find main() to load it?

SCJP - 86% - June 11, 2009
Carl Wauters

Joined: Aug 02, 2007
Posts: 19
Java can't find your .class files. Make sure the .class files directory is in your classpath (via environment variable CLASSPATH or via adding -cp directoryname in your command line

camilo lopes
Ranch Hand

Joined: Aug 08, 2007
Posts: 202
it sees where classpath is being its, in annex I placed a tutorial one in Portuguese (you can use a translator) that she teaches to configure the variaveis of environment in less than 5 minutes and to leave everything ok. This error of compilation, is why its archive class was not found.

Brazil - Sun Certified Java Programmer - SCJP 5 About Java - Update every Week.
Guide SCJP - tips that you need know
I agree. Here's the link:
subject: runtime error
It's not a secret anymore!