| Author |
Please Help
|
deepa philu
Greenhorn
Joined: Dec 13, 2007
Posts: 3
|
|
Hi All, I am facing the following problem while ecxecuting a program, when I try to change the values of the variables. Kindly help. Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\Deepa_Hodlur>cd.. C:\Documents and Settings>d: D:\>cd deepa D:\Deepa>cd javatest The system cannot find the path specified. D:\Deepa>cd prog D:\Deepa\Prog>java prog1 hello world D:\Deepa\Prog>javac Comparing.java Comparing.java:1: 'class' or 'interface' expected Class Comparing ^ 1 error D:\Deepa\Prog>javac Comparing.java Comparing.java:10: ')' expected System.out.println(A is equal to B) ^ Comparing.java:11: ';' expected } ^ Comparing.java:14: ')' expected System.out.println(A is lesser than B) ^ Comparing.java:15: ';' expected } ^ Comparing.java:19: ')' expected System.out.println(A is greater than b) ^ Comparing.java:20: ';' expected } ^ 6 errors D:\Deepa\Prog>javac Comparing.java Comparing.java:10: ')' expected System.out.println(A is equal to B); ^ Comparing.java:14: ')' expected System.out.println(A is lesser than B); ^ Comparing.java:19: ')' expected System.out.println(A is greater than b); ^ 3 errors D:\Deepa\Prog>javac Comparing.java D:\Deepa\Prog>java Comparing A is lesser than B D:\Deepa\Prog>java Comparing A is lesser than B D:\Deepa\Prog>javac Comparing.java D:\Deepa\Prog>java Comparing.java Exception in thread "main" java.lang.NoClassDefFoundError: Comparing/java What does the above error mean? Has it got something to do with the classpath? Can anyone help me? Thanks Deepa
|
 |
Henry Wong
author
Sheriff
Joined: Sep 28, 2004
Posts: 16695
|
|
Try.... "java Comparing" instead of "java Comparing.java". Henry
|
Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
|
 |
Henry Wong
author
Sheriff
Joined: Sep 28, 2004
Posts: 16695
|
|
Try.... "java Comparing" instead of "java Comparing.java". Henry
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12928
|
|
D:\Deepa\Prog>javac Comparing.java Comparing.java:1: 'class' or 'interface' expected Class Comparing ^ 1 error
Java is case-sensitive. The keyword is class with a lower-case c, but you wrote Class with an upper-case C.
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
 |
|
|
subject: Please Help
|
|
|