This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "runtime error" Watch "runtime error" New topic
Author

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();
oB.bounce();
oB.setBounceFactor(8);
}
}
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?


------------------------
Bob
SCJP - 86% - June 11, 2009
Carl Wauters
Greenhorn

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


SCJP 5.0, SCWCD 1.4, SCBCD 5.0, SCJD, SCDJWS 5.0, SCEA/OCMJEA 5
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
http://www.camilolopes.com/ About Java - Update every Week.
Guide SCJP - tips that you need know http://blog.camilolopes.com.br/livrosrevistaspalestras/
 
Don't get me started about those stupid light bulbs.
 
subject: runtime error
 
Similar Threads
Declaring an Interface
Polymorphic behavior provided by inheritance programming assignment
interface and absrtact class
K&B page no 121 doubt
interface error