-
Run a compiled class
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
-
Re: Run a compiled class
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
-
Re: Run a compiled class
"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
-
Re: Run a compiled class
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
-
Re: Run a compiled class
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
>
-
Re: Run a compiled class
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
>>
>
-
Re: Run a compiled class
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|