I"ve sầu just wasted 2 hours trying khổng lồ vị something which I"ve sầu 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 lớn produce a header tệp tin based on a class called "CANController", with the source located in "BoardGUIv3/src/model" and the class tệp tin in "BoardGUIv3/bin/model".

Bạn đang xem: Javah

I"ve sầu done exactly this thing before, but for some reason I can"t seem khổng lồ do this simple, one-line command again.

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

javah -classpath src/model/CANControllerMy classpath should just be the root directory, shouldn"t it?


java java-native-interface javah
Share
Improve this question
Follow
asked Sep 9 "13 at 16:53
*

TagcTagc
7,74166 gold badges4747 silver badges100100 bronze badges
1
Add a comment |

1 Answer 1


Active Oldest Votes
12
Here is the javah command usage:

javahLocation -o outputFile -classpath classpath importNameand it should be used like this for you class:

javah -o "CANController.h" -classpath "C:pathToYourProjDirBoardGUIv3in" Model.CANControllerJust correct the path to lớn your classfile with the real path and the package structure if required.

Xem thêm: Trẻ 5 Tháng Tuổi Ngủ Bao Nhiêu Tiếng 1 Ngày Là Đủ? Lịch Trình Ăn, Ngủ Tham Khảo Cho Trẻ 5


Share
Improve sầu this answer
Follow
edited Sep 9 "13 at 17:05
answered Sep 9 "13 at 16:55
*

Juned AhsanJuned Ahsan
64.1k99 gold badges8888 silver badges124124 bronze badges
8
| Show 3 more comments

Your Answer


Thanks for contributing an answer to Stack Overflow!

Please be sure to lớn answer the question. Provide details & cốt truyện your research!

But avoid

Asking for help, clarification, or responding lớn other answers.Making statements based on opinion; baông chồng them up with references or personal experience.

To learn more, see our tips on writing great answers.


Draft saved
Draft discarded

Sign up or log in


Sign up using Google
Sign up using Facebook
Sign up using E-Mail và Password
Submit

Post as a guest


Name
E-Mail Required, but never shown


Post as a guest


Name
Email

Required, but never shown


Post Your Answer Discard

By clicking “Post Your Answer”, you agree to lớn our terms of service, privacy policy & cookie policy


Not the answer you're looking for? Browse other questions tagged java java-native-interface javah or ask your own question.


The Overflow Blog
Featured on Meta
Linked
0
ERROR: Javah not working
Related
2912
How bởi I thử nghiệm a private function or a class that has private methods, fields or inner classes?
3577
How do I efficiently iterate over each entry in a Java Map?
3170
What is a serialVersionUID & why should I use it?
4343
How do I read / convert an InputStream into lớn a String in Java?
3313
When lớn use LinkedList over ArrayList in Java?
3746
How bởi vì I generate random integers within a specific range in Java?
2015
How khổng lồ use java.net.URLConnection to fire & handle HTTPhường requests?
3229
How vày I convert a String to lớn an int in Java?
3438
How can I create a memory leak in Java?
3780
Proper use cases for Android UserManager.isUserAGoat()?
Hot Network Questions more hot questions

Question feed
Subscribe to lớn RSS
Question feed To subscribe to lớn this RSS feed, copy and paste this URL into your RSS reader.


*

lang-java
Staông xã Overflow
Products
Company
Staông chồng Exchange Network
site design / hình ảnh © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev2021.6.25.39582


Staông chồng Overflow works best with JavaScript enabled
*

Your privacy

By clicking “Accept all cookies”, you agree Stachồng Exchange can store cookies on your device và discthua information in accordance with our Cookie Policy.

Bài viết liên quan

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *