A DESCRIPTION OF THE PROBLEM :
When trying to generate c header code using javac -h, you need to enter a directory for the .h file to be saved to (javac -h 'dir' HelloWorld.java). If you do not (e.g. javac -h HelloWorld.jav) you get an error: "error: no source files." This is very misleading because as you can see the user did give a source file.
After much searching I found this answer https://stackoverflow.com/a/46625782/9525782.
I suggest a clearer error if the user does not give a destination (Error, no destination folder given) or, if one is not given just default to the current directory.
When trying to generate c header code using javac -h, you need to enter a directory for the .h file to be saved to (javac -h 'dir' HelloWorld.java). If you do not (e.g. javac -h HelloWorld.jav) you get an error: "error: no source files." This is very misleading because as you can see the user did give a source file.
After much searching I found this answer https://stackoverflow.com/a/46625782/9525782.
I suggest a clearer error if the user does not give a destination (Error, no destination folder given) or, if one is not given just default to the current directory.