Hello
I am trying to run a compiled class and I am getting the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: Jabberwock/class
Does anybody know how I can fix this?
Thanks in advance
Robert
Printable View
Hello
I am trying to run a compiled class and I am getting the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: Jabberwock/class
Does anybody know how I can fix this?
Thanks in advance
Robert
my guess is that you are using this command line
java Jabberwock.class
this is incorrect. this tells the VM to find a class called "class" in package
"Jabberwock". Eliminate the ".class" from the command line (i.e. java Jabberwock)
and it should work. note, i am assuming you are using the default package.
cheers,
mike
"Robert Levy" <rlevy@sympatico.ca> wrote:
>
>Hello
>
>I am trying to run a compiled class and I am getting the following error:
>Exception in thread "main" java.lang.NoClassDefFoundError: Jabberwock/class
>
>Does anybody know how I can fix this?
>
>Thanks in advance
>
>Robert
"Robert Levy" <rlevy@sympatico.ca> wrote:
>
>Hello
>
>I am trying to run a compiled class and I am getting the following error:
>Exception in thread "main" java.lang.NoClassDefFoundError: Jabberwock/class
>
>Does anybody know how I can fix this?
>
>Thanks in advance
>
>Robert
give details about ur program whats ur program suppose to be doing
Chech your classPath environment variable.
"Robert Levy" <rlevy@sympatico.ca> wrote:
>
>Hello
>
>I am trying to run a compiled class and I am getting the following error:
>Exception in thread "main" java.lang.NoClassDefFoundError: Jabberwock/class
>
>Does anybody know how I can fix this?
>
>Thanks in advance
>
>Robert
Hello Robert
Check your class name, should match exactly with the file name and define
classpath properly.
"Friends" <robinsonstud@yahoo.com> wrote:
>
>Chech your classPath environment variable.
>
>"Robert Levy" <rlevy@sympatico.ca> wrote:
>>
>>Hello
>>
>>I am trying to run a compiled class and I am getting the following error:
>>Exception in thread "main" java.lang.NoClassDefFoundError: Jabberwock/class
>>
>>Does anybody know how I can fix this?
>>
>>Thanks in advance
>>
>>Robert
>
I agree with the answer.
"Ravi" <ravisco@usa.net> wrote:
>
>Hello Robert
>
>Check your class name, should match exactly with the file name and define
>classpath properly.
>
>
>"Friends" <robinsonstud@yahoo.com> wrote:
>>
>>Chech your classPath environment variable.
>>
>>"Robert Levy" <rlevy@sympatico.ca> wrote:
>>>
>>>Hello
>>>
>>>I am trying to run a compiled class and I am getting the following error:
>>>Exception in thread "main" java.lang.NoClassDefFoundError: Jabberwock/class
>>>
>>>Does anybody know how I can fix this?
>>>
>>>Thanks in advance
>>>
>>>Robert
>>
>
Dear Robert,
The problem can be because of two reasons.
1. Your classpath may not be set to include the current directory. To set
the classpath the current directory do the following.
> set classpath=%classpath%;.
The . represents the current directory.
2. You are executing the class like this ->
java programname.class.
Do not include the .class extension when you execute. Just say,
java programname.
Bye
RK