Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8225170

javac -h error message unclear

XMLWordPrintable

    • generic
    • generic

      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.


            fmatte Fairoz Matte
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: