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

7u21 change to Runtime.exec breaks Maven execution in NetBeans

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P2 P2
    • None
    • 7u21
    • core-libs
    • windows

      In netbeans we are using java.lang.ProcessBuilder.start() to execute maven builds. Since 7u21 the process fails on windows in some specific cases. eg. we pass a system property to maven -Dexec.args=<value> to instruct the maven exec plugin to execute another JVM. <value> in this case can contain multiple parameters for java.exe including those that have space in the value, for example when profiling an app, we pass -agentpath:<path> where path points to a path within netbeans and in most cases contains spaces. More details are available in the NetBeans bug referred below.

      The 7u21 update release notes mention that ProcessBuilder should be used instead of Runtime.exec(). We are already using ProcessBuilder.start() but experience the same issue.

      Please advice how to proceed or fix this regression on Java side in the next 7uX update.

      Related NetBeans bug:
      https://netbeans.org/bugzilla/show_bug.cgi?id=228901

            uta Alexey Utkin (Inactive)
            anebuzel Antonín Nebuželský
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: