This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 224293 - Launched command-line is too long for Windows
Summary: Launched command-line is too long for Windows
Status: RESOLVED INVALID
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-28 20:40 UTC by _ gtzabari
Modified: 2012-12-28 20:53 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2012-12-28 20:40:43 UTC
Product Version: NetBeans IDE Dev (Build 201212240001)
Java: 1.7.0_10; Java HotSpot(TM) 64-Bit Server VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_10-b18
System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb)
User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev

1. I invoke: "Debug Test File" on a Maven Java project
2. Netbeans fails right away with "Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-cli) on project server.web: No tests were executed!  (Set -DfailIfNoTests=false to ignore this error.) -> [Help 1]"
3. Upon further investigation I discovered that the command-line Netbeans is invoking is too long. The command-line in question is:

"C:\Program Files\Java\jdk1.7.0_10\jre\bin\java" -Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=16156 -jar C:\Users\Gili\Documents\Vetailr\server\web\target\surefire\surefirebooter6838156833777824716.jar C:\Users\Gili\Documents\Vetailr\server\web\target\surefire\surefire2615021415264774198tmp C:\Users\Gili\Documents\Vetailr\server\web\target\surefire\surefire895040963097416376tmp"

Normally I'd suggest using the @argfiles option mentioned here: http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javac.html

but it doesn't look like the "java" application supports it: http://docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html

We need a general solution for "java"-based tasks. Any ideas? (And no, moving my project to a different location isn't really a solution)
Comment 1 _ gtzabari 2012-12-28 20:53:30 UTC
The error message I was receiving was misleading. Windows reports "command-line is too long" if you omit a quote after java.exe. Sorry for the false alarm.

As a side-note, the command-line limit under Windows is 8191 characters so I think we're safe for now :)