Bad class files?

P

priya

HI All,

I have java code in the following path
D:\test\mypackage\sample\check.java

i have include package in my java code

package mypackage.sample

I have set Classpath: D:\test


Compiling the java code :D:\test\mypackage\sample>javac -g check.java

Generating Jni header files : D:\test\mypackage\sample>javah -jni check
error: cannot access check
bad class file: .\check.class
class file contains wrong class: mypackage.sample.check
Please remove or make sure it appears in the correct subdirectory of
the classpa
th.


I am using Jdk1.5 version....I have got the above error ..

But when i use jdk1.4 version..everything is working fine...

Dont have idea how it varies from version to version....


plz someone help me to solve the issues..
 
S

shuangwei

Try to run at D:\test>javac -g mypackage\sample\check,java;
D:\test>javah -jni mypackage.sample.check
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top