Review request: 8003562: Provide a command-line tool to find static dependencies

Mandy Chung mandy.chung at
Tue Dec 18 11:38:58 PST 2012

On 12/18/12 9:06 AM, Ulf Zibis wrote:
> Am 18.12.2012 05:15, schrieb Mandy Chung:
>> On 12/17/12 8:13 AM, Ulf Zibis wrote:
>>> Am 17.12.2012 16:23, schrieb Alan Bateman:
>>>> I mostly agree with your argument that this is a new tool and that 
>>>> we should be consistent with GNU-style options. So what was the 
>>>> final bid is, is it --classpath or --class-path?
>> I propose --class-path so that it makes it easier to determine 
>> -classpath is not supported
> I have some objections against --class-path and vote for --classpath. 

I'm happy with "--classpath" and "-c" is the short form.

> ....
> What about allowing (maybe define for preferred usage) GNU/UNIX path 
> separators even on Windows? E.g.
> java --classpath=C/java/jre6/lib/rt.jar ...
> - This would make java again more platform independent.
> - The mixure of UNIX and/or GNU-style options with Windows path syntax 
> looks ugly to me.

I don't like dealing with Windows paths either.

One use case we expect that one may take the -classpath option that may 
have a long list of paths from the script for launching the application 
and pass it to jdeps.   That means jdeps would have to support both 
Windows paths as well as Unix paths.  It's a reasonable enhancement that 
we can consider later.  I'd really like to get this out in the next few 

> Additionally we also have a 3rd style in use, e.g. "java 
> mypackage.MyClass".
>>>> I guess it wouldn't do any harm to silently supporting -cp and 
>>>> -classpath as folks used to java* tools will probably use them 
>>>> without thinking.
>> How important to carry the same option -cp and -classpath on j* 
>> tools?  I do think developers can well adapt to a slight different 
>> option when using a new tool.  I'm inclined not to mix these styles.  
>> In addition, I'd like to see how jdeps will be used after the initial 
>> push and people finds --class-path hard to move to.
> My vote:
> silently support old style with space as separator and document this 
> as a side note on:

You meant :-)

We have an agreement on --classpath.  It's helpful to get developers to 
play with jdeps and we can then improve it once we get feedback.   I'll 
leave the old style options out in this patch as I'm inclined not to 
support both old style and GNU-style.

>>> Thanks for supporting my arguments about "silent familarity" to old 
>>> style, Alan.
>>> As --class(-)path is a frequent and important option, I additionally 
>>> think, we should have an official short form. If '-cp' doesn't 
>>> conform with GNU-style, what about '-C' ?
>> I considered '-C' and it might be confused with 'jar -C' and 'tar -C' 
>> option to change the directory.  I think '-c' may be okay and it can 
>> avoid such confusion and closer to '-cp'.   Are you okay with that?
> I agree! "-C" was from my non-reflected guess, that '-c' would be yet 
> occupied, as you didn't consider a short form from the beginning. 
> Thanks for your closer look.

I missed to mention the short form in my previous reply but I did 
consider it :)  Thanks for all the feedback.  Really appreciated.


More information about the compiler-dev mailing list