Common errors and correct usage of exporting class header files with Javah

Source: Internet
Author: User

today, when developing an Android project, you need to export the JNI C header file from the class file generated by the Android project with the Javah command, but the error is as follows:


Figure 1


Figure 2

First correct the error in 11: Under Windows CMD window, use CD f:\...\ ... Such a command cannot be located to the f:\...\ ... Directory, you must first enter F:, and then press ENTER to enter the f:\...\ ... Directory.

For the error in Figure 2, I refer to this article: http://blog.csdn.net/hejinjing_tom_com/article/details/8125648, but according to his method will still error, such as:


Later checked the use of the Javah command, and refer to the blog: http://www.cnblogs.com/kissazi2/p/3298884.html, finally successfully exported the JNI C language header file, such as:


Summary: Javah-classpath should be used for loading class paths, such as my f:\ personal project \ Parking Butler \ License Plate Recognition Module \carrecognition\carplate\bin\classes, Instead of the previously mentioned Jar path for the Android SDK. -D followed by the location of the generated header file we specified, here I am f:/, is under the F packing directory.

Sometimes a small problem will toss half a day, I hope my summary is helpful to everyone.

Common errors and correct usage of exporting class header files with Javah

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.