Saturday, May 22, 2010

I wrote this program in the notepad and dont know whats wrong with it?

class X


{





public static void main(String args[])


{





System.out.println("Java revisited");


}





}





while compiling i used the following commands


c:\path=C:\Program Files\Java\jdk1.5.0\bin


javac X.java


java X


but its giving me the following error


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





can u tell me whats the problem?

I wrote this program in the notepad and dont know whats wrong with it?
try this


class x {


public static void main(String[] args) {


System.out.println("java revisited");


}


}








http://java.sun.com/docs/books/tutorial/...
Reply:i checked this program it is working...........mmmmmmm.........still u have trouble then just copy your jdk1.5.0 folder in c drive then run it.


No comments:

Post a Comment