• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compilation Error

 
Shiraz Bhagwagar
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you trying to compile RMI programs? Got a clue what "server" refers to?
 
Shiraz Bhagwagar
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No one yet ..............
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic