How to use javah

南楼画角 提交于 2019-12-12 09:34:05

问题


I've just wasted 2 hours trying to do something which I've already done twice before. I can't remember the exact procedure I used the previous two times, but it really shouldn't be giving me this much trouble:

I have a project folder called "BoardGUIv3". I want to produce a header file based on a class called "CANController", with the source located in "BoardGUIv3/src/model" and the class file in "BoardGUIv3/bin/model".

I've done exactly this thing before, but for some reason I can't seem to do this simple, one-line command again.

I'm pretty sure it's something along the lines of

javah -classpath <classpath> src/model/CANController

My classpath should just be the root directory, shouldn't it?


回答1:


Here is the javah command usage:

{javahLocation} -o {outputFile} -classpath {classpath} {importName}

and it should be used like this for you class:

javah -o "CANController.h" -classpath "C:\pathToYourProjDir\BoardGUIv3\bin" model.CANController

Just correct the path to your classfile with the real path and the package structure if required.



来源:https://stackoverflow.com/questions/18703185/how-to-use-javah

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!