0

http://www.deitel.com/books/jHTP5/jHTP5_faq.html#compile%20servlet

Go here to get a better explaintion than my simple answer. I had this error and I looked all over online in many many forums. I then went back to my textbooks website which gave me the above page.
You can do two things

When compiling the fiile type javac -classpath . yourfilenam.java
when you go to run the program type java -classpath . yourfilename
You MUST add the space . space inbetween -crosspath and what you named your file.


It talks that you can change having to type the -classpah by eliminating the variable crosspath. I wouldn't mind doing that if I knew how to get the variable back if my computer objects. I don't liike to delete things if I don't know how to get it back or I definantly don't want it.

If this works for you pass it on to any forums you see.

Mary

Hi,

I'm trying to run my program in command prompt, but i get this error:

Exception in thread "main" java.lang.NoClassDefFoundError: Invaders

Can anybody tell me what this error means?

Thanx.

3
Contributors
2
Replies
3
Views
12 Years
Discussion Span
Last Post by satija_tarun
0

Says it all really, it can't find the class.
What part of "No Classdef(inition) Found Error" don't you understand?

0
import java.sql.*;

class Student1
{
    public static void Main(String[] ar)
    {
    try
    {
    Class.forName(

Edited by Reverend Jim: Fixed formatting

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.