JDK-5036373 : Tool doc for 'java' should document Windows-specific command arg processing
  • Type: Enhancement
  • Component: docs
  • Sub-Component: guides
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2004-04-22
  • Updated: 2013-06-26
  • Resolved: 2013-06-26
Related Reports
Relates :  
Relates :  
Relates :  
Description
Name: rmT116609			Date: 04/22/2004


A DESCRIPTION OF THE PROBLEM :
On Windows, the JRE does clever things with the command-line arguments passed
to the Java application.  For example,

      java some.class *.java

will do wildcard expansion on "*.java", and call the Java app's 'main' method
with a list of file names.

The problem is that this is not documented ... at least not in the obvious place.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
A description of how the 'java' command on Windows preprocesses the command
line arguments before they are passed to the Java app's main method.

The following should be covered:

  1)  the wildcard characters supported, and what they mean
  2)  any restrictions on wildcarding
  3)  how quotes are handled; e.g. handling mismatched quotes, quote stripping,
       inhibition of wildcarding within quotes.
  4)  any other mechanisms that modifiy the "java" command's handling of args
       in the Windows context.

URL OF FAULTY DOCUMENTATION :
http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/java.html
(Incident Review ID: 233540) 
======================================================================

Comments
This bug is old. Java Wildcard expansion on Windows platform has been documented. See the following links: http://docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html http://docs.oracle.com/javase/7/docs/technotes/tools/windows/classpath.html Wildcard expansion does not work in a Windows command shell for a single element classpath due to the Microsoft bug described in: http://connect.microsoft.com/VisualStudio/feedback/details/98756/vs2005-setargv-obj-wildcard-handling-broken. The limitations are also mentioned in 7u10 release notes: http://www.oracle.com/technetwork/java/javase/7u10-relnotes-1880995.html
26-06-2013

EVALUATION Perhaps we can mention that the java command on Windows preprocesses the command line arguments before they are passed to the Java app's main method. If necessary, someone with a Windows system would need to research this. Assigning to you, Doug, to say if we should document or not. ###@###.### 2004-04-23
23-04-2004