javac -target does not work without -source

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P3
    • None
    • Affects Version/s: 7
    • Component/s: tools
    • None
    • 7

      Create simple Test.java
      public class Test {
        public static void main(String[] args) {
        }
      }

      Have JDK 7 installed
      try javac -target 1.6 Test.java
      FAIL: javac: target release 1.6 conflicts with default source release 1.7

      try javac -target 1.6 -source 1.6 Test.java
      Success.

      The same when you try to use -target 1.5 or -target 1.4.2

            Assignee:
            Unassigned
            Reporter:
            Alexander Ioffe (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: