It may be a classpath problem. Try this command before running java: set CLASSPATH=
... and paste the content of your source file. 2014-02-11 0:16 GMT+01:00 Jaya <[email protected]>: > I am getting the following error. What am I missing here? > > Directory of c:\MyJavatrainingPrograms > > 02/07/2014 12:27 PM <DIR> . > > 02/07/2014 12:27 PM <DIR> .. > > 02/07/2014 12:27 PM 415 Hello.class > > 02/07/2014 12:27 PM 187 Hello.java > > 2 File(s) 602 bytes > > 2 Dir(s) 201,567,584,256 bytes free > > > > c:\MyJavatrainingPrograms>java Hello > > Exception in thread "main" java.lang.NoClassDefFoundError: Hello > > Caused by: java.lang.ClassNotFoundException: Hello > > at java.net.URLClassLoader$1.run(Unknown Source) > > at java.security.AccessController.doPrivileged(Native Method) > > at java.net.URLClassLoader.findClass(Unknown Source) > > at java.lang.ClassLoader.loadClass(Unknown Source) > > at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) > > at java.lang.ClassLoader.loadClass(Unknown Source) > > Could not find the main class: Hello. Program will exit. > Thanks, > Jaya > > > > > > On Friday, February 7, 2014 12:31:08 PM UTC-6, Jaya wrote: >> >> Thanks for the help. I am not sure what \8220 or \8221 are but I just >> removed the quotes and added again, It is working fine now. >> --Jaya >> >> On Thursday, February 6, 2014 11:33:10 PM UTC-6, Jaya wrote: >>> >>> I am getting the following error. Can you please tell me what is missing? >>> >>> >>> >>> >>> c:\MyJavatrainingPrograms>javac Hello.java >>> >>> Hello.java:7: illegal character: \8220 >>> System.out.println(ôHello worldö); >>> ^ >>> Hello.java:7: ';' expected >>> System.out.println(ôHello worldö); >>> ^ >>> Hello.java:7: illegal character: \8221 >>> System.out.println(ôHello worldö); >>> ^ >>> Hello.java:7: not a statement >>> System.out.println(ôHello worldö); >>> ^ >>> 4 errors >>> >>> c:\MyJavatrainingPrograms> >>> >> -- > You received this message because you are subscribed to the Google Groups > "JPassion.com: Java Programming" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > Visit this group at http://groups.google.com/group/jpassion_java. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "JPassion.com: Java Programming" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at http://groups.google.com/group/jpassion_java. For more options, visit https://groups.google.com/groups/opt_out.
