Javah Command Usage record

Source: Internet
Author: User

Demand:

COCOS2DX Android Game development requires that you often call C + + functions from Java code, which is to use the Javah class file generated by the Java file, generates a header file.

Build steps:

1, into the Android Project Bin directory, the bin directory will have a classes directory, this directory is our project Java files generated by the class file.

2. Enter the classes directory

3. Execute Javah command:

Xxx\bin\classes>javah-classpath. com.dd.mm.zz.classname (does not contain a. class suffix)

4, will be in the current directory to generate the header files we need.


Note: You do not need to specify all the jar package paths with-classpath. Just need to use only . Can.

If you have an error similar to the following: it is generally because the path is not correct.

Error: Unable to access com.dd. Mm.zz.classname

Com.dd not found . class files for mm.zz.classname

Javadoc: Error-Class com.dd not found . mm.zz.classname.

Error: No classes were specified on the command line. Please try using-help.

Javah command usage record

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.