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

`java` should print warning when `-jar` is used with class path option

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      Relates to JDK-4356783

      # Problem
      When `java -jar ...` is used together with a class path option (e.g. `-cp`) that option is silently ignored.
      This behavior might not be obvious to users, and it will be difficult to understand why ClassNotFoundExceptions occur, especially if different setups with `-cp` worked correctly for the user.

      (And also the documentation for `-cp` does not mention that it might be ignored; only the documentation for `-jar` mentions it.)

      # Suggested solution
      When `-jar` is used together with a class path option such as `-cp` a warning should be printed that the class path option is ignored.



            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: