• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Compilation Error

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No one yet ..............
 
Cindy Glass
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
I like you because you always keep good, crunchy cereal in your pantry. This tiny ad agrees:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic