---
title: "Java Native Interface (JNI) - JNI javah error : class file contains wrong class"
author: "standalone"
date: "2010-08-06T08:26:50Z"
tags: []
categories: ["编程语言"]
slug: "java-native-interface-jni-jni-javah-error-class-file-contains-wrong-class"
draft: false
lastmod: "2010-08-06T08:26:50Z"
id: 730532
url: "https://standalone.iteye.com/blog/730532"
---

[http://forums.sun.com/thread.jspa?threadID=709403](http://forums.sun.com/thread.jspa?threadID=709403)

 

On how java tools find user classes:  
A class/java file has a subpath name that reflects the class's fully-qualified name. For example, if the class com.mypackage.MyClass is stored under /myclasses, then /myclasses must be in the user class path and the full path to the class file must be /myclasses/com/mypackage/MyClass.class (or .java)