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.
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.
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.
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.
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
"JavaRanch, where the deer and the Certified play" - David O'Meara
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 like you because you always keep good, crunchy cereal in your pantry. This tiny ad agrees: