How to use command javac -h to make header file?

국민 남 0 Reputation points
2023-02-10T12:45:16.1733333+00:00

Recently, something happened that I had to use the command statement javac-h. I don't know how to use javac -h.

Developer technologies C++
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Viorel 122.6K Reputation points
    2023-02-10T14:38:32.2433333+00:00

    For example, if Java is installed, your code file is called MyClass1.java and the Command Prompt is already opened, then type:

    javac MyClass1.java -h .

    This will generate MyClass1.class and MyClass1.h. Use #include "MyClass1.h" in your C++ code to implement the native functions according to Java documentation.

    0 comments No comments

  2. YujianYao-MSFT 4,296 Reputation points Microsoft External Staff
    2023-02-13T02:27:46.25+00:00

    Hi 국민 남,

    I suggest you to read this issue, it contains a relatively complete steps.

    (Since your question is more Java-related, I suggest you go to the Java Forum and ask.)

    Best regards,

    Elya


    If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.