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 Compilation Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Compilation Error" Watch "Compilation Error" New topic
Author

Compilation Error

Shiraz Bhagwagar
Greenhorn

Joined: Mar 28, 2001
Posts: 27
While compiling java programs, (using JDK 1.3.1), I get an error
"Exception in thread main java.lang.NoClassDefFoundError :server"
What could this be. I have set the path to c:\jdk1.3.1\bin
What else could this be.
I cannot compile any programs. Am using Win 2000 Prof. .
Got the same error on another machine and got rid of the error by setting the path variable.
navin kumar
Greenhorn

Joined: May 22, 2001
Posts: 9
hello,
After compilation of Your program, at command prompt
> java <classname>;
You must give the classname which is having the main() method.
for ex: test.java

class test
{
public static void main(String args[])
{
System.out.println("THIS IS FOR TESTING");
}
}
>javac test.java
>java test => this command gives
THIS IS FOR TESTING
If U had still doubts regarding this concept, U can contact me.
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Are you trying to compile RMI programs? Got a clue what "server" refers to?

"JavaRanch, where the deer and the Certified play" - David O'Meara
Shiraz Bhagwagar
Greenhorn

Joined: Mar 28, 2001
Posts: 27
Yes Navin I did get that.
Cindy, I am trying to code a chat program. The server is the chat server and the client is that chat client. That is what the server is. In fact I am surprised that none of the programs (even the simple ones like the on Navin has written) compile. That is what surprises me.
Shiraz Bhagwagar
Greenhorn

Joined: Mar 28, 2001
Posts: 27
Cindy, Also I forgot to add. These are not RMI programs, these are just simple java programs using the material prescribed in tHe Certification syllabus.
Shiraz Bhagwagar
Greenhorn

Joined: Mar 28, 2001
Posts: 27
No one yet ..............
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Well, I don't know anything about Win2000.
WAIT! just thought of something - I heard about some problems . . .
Apparently you need to install the service pack 1 (sp1) to fix a few problems in win2000.
This has a link to the download. http://support.microsoft.com/support/kb/articles/Q273/7/35.ASP
Shiraz Bhagwagar
Greenhorn

Joined: Mar 28, 2001
Posts: 27
Yes Cindy. I have downloaded the patches. I have downloaded the java executable and re-installed it. Nothing works. I get the same error.
Exception in thread "main" java.lang.NoClassDefFoundError:server.
This very same program runs on my other machine with Win ME. Have checked the path file and there seems to be no problem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compilation Error