I have a problem. I want to run a programm in java that is written in C++. For that purpose I have to create headerfiles and to compile. I watched several tutorials. They all just telling me to type in that and click on button and the file is created. But it is not. Nothing is working at all. When I have to set up configuration. Therefore I shall give several input like location of the exe file of javac, the working directory and so on. That is not a problem. The problems occure when I have to give the arguments. I get different error messages. And I don't find usable help to those. To me it is just not figure out what I shall give as arguments and all tutorials and helps doesn't change anything. Can anyone tell me in easy language what I have to give as arguments. For example. You have a file with the name fileToGive.abc . It is located at C:/file/fileToGive.abc . So you have to type in $filepath{C:/file/} or you have to type in $path:{/file} Thanks for your help.
Asked
Active
Viewed 147 times
0
-
Frankly, I don't understand what you are trying to achieve. What is the relation between "written in C++" and "run in java"? C++ programs must be compiled by a C++ compiler not a Java compiler. Also invoking `javac` is rarely needed in Eclipse, as Eclipse has its own Java compiler built in. Just from the tag `javah` I can guess that you are perhaps trying to include "native" code in a Java application? Then, true you'd need an external tool configuration, but maybe `javah`, not `javac`? Finally, when asking for help about error message, please show us the message you get. – Stephan Herrmann Feb 28 '20 at 22:14
-
Hello. Thanks for your answer so far. I am new to this topic and I think that there are things I haven't fully understood. Now I made a litte more progress in this issue so I am not sure if my question was well formulated so I can't give you further informations leeding you to give me a answer to my questions. I think I will keep on learning and when I am at the point where I can ask propper questions I give these to the forum. Thanks for your efforts. – G S Feb 29 '20 at 12:09
-
But only one thing. I use jdk-13.0.2 . There is no javah.exe. Only javac.exe. I red that javac.exe includes javah. Is that right? – G S Feb 29 '20 at 12:16
-
OK, using `javac` as the new `javah` explains one part (sounds like you want to add `-h`). Next: you are asking for help regarding error messages that you don't understand, so show us the error message :) – Stephan Herrmann Mar 01 '20 at 12:10
-
Hello. Thanks for your help. – G S Mar 10 '20 at 20:05