File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Please Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Please Help" Watch "Please Help" New topic
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: 18509
    
  40

D:\Deepa\Prog>java Comparing.java
Exception in thread "main" java.lang.NoClassDefFoundError: Comparing/java


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: 18509
    
  40

D:\Deepa\Prog>java Comparing.java
Exception in thread "main" java.lang.NoClassDefFoundError: Comparing/java


Try.... "java Comparing" instead of "java Comparing.java".

Henry
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Please Help
 
Similar Threads
Minimum and maximum useable values for int long
Problem with the installation.
head first beersong problem?
Setting up Java