Harmony
  1. Harmony
  2. HARMONY-4069

[classlib][launcher] 'java -help', 'java -X' output is very poor

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Classlib
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      'java -help', 'java -X' output is very poor in comparison with RI.

      Help options give very little information and it make worse Harmony usability.

      It looks like existing print_generic_help() and print_help_on_nonstandard_options() from vmcore/src/init/parse_arguments.cpp are not used.

      'java -help' output on Harmony-r544727:

      Harmony Java launcher
      Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors,
      as applicable.
      java [-vm:vmdll -vmdir:dir -D... [-X...]] [args]

      'java -X' output on Harmony-r544727:

      Harmony Java launcher
      Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors,
      as applicable.
      java [-vm:vmdll -vmdir:dir -D... [-X...]] [args]

      Similar issue HARMONY-3876 was closed recently,
      but it looks like it was partially fixed: only returning value was corrected.

      Please, see also HARMONY-3409 concerning 'java -XX' .

        Activity

        Hide
        Elena Sayapina added a comment -

        Verified on Harmony-r548581. -help, -X give detailed output.

        Output 'java -help':

        Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors,
        as applicable.
        java version "1.5.0"
        pre-alpha : not complete or compatible
        svn = r548581, (Jun 19 2007), Windows/ia32/msvc 1310, release build
        http://harmony.apache.org
        Usage: java [-options] class [args...]
        (to execute a method main() of the class)
        or java [-options] -jar jarfile [args...]
        (to execute the jar file)

        where options include:
        -classpath <class search path of directories and zip/jar files>
        -cp <class search path of directories and zip/jar files>
        A ';' separated list of directories, jar archives,
        and zip archives to search for class file
        -D<name>=<value>
        set a system property
        -showversion print product version and continue
        ...

        Show
        Elena Sayapina added a comment - Verified on Harmony-r548581. -help, -X give detailed output. Output 'java -help': Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable. java version "1.5.0" pre-alpha : not complete or compatible svn = r548581, (Jun 19 2007), Windows/ia32/msvc 1310, release build http://harmony.apache.org Usage: java [-options] class [args...] (to execute a method main() of the class) or java [-options] -jar jarfile [args...] (to execute the jar file) where options include: -classpath <class search path of directories and zip/jar files> -cp <class search path of directories and zip/jar files> A ';' separated list of directories, jar archives, and zip archives to search for class file -D<name>=<value> set a system property -showversion print product version and continue ...
        Hide
        Alexei Zakharov added a comment -

        Thanks Elena and Eugene. The patch was applied at the revision 548420. Please verify it was applied as expected.

        Show
        Alexei Zakharov added a comment - Thanks Elena and Eugene. The patch was applied at the revision 548420. Please verify it was applied as expected.
        Hide
        Gregory Shimansky added a comment -

        According to Eugene's evaluation this is a launcher problem.

        Show
        Gregory Shimansky added a comment - According to Eugene's evaluation this is a launcher problem.
        Hide
        Eugene S. Ostrovsky added a comment -

        Added patch:
        H4069-Launcher-passes-help-options-to-VM.patch

        Fix for the issue.

        Show
        Eugene S. Ostrovsky added a comment - Added patch: H4069-Launcher-passes-help-options-to-VM.patch Fix for the issue.
        Hide
        Eugene S. Ostrovsky added a comment -

        It seems that patch for HARMONY-3876 committed in r542499 is incorrect.
        It makes launcher to check for -help and -X options, print short usage message and exit without creating VM. Thus VM is unable to print it's detailed information for these options.

        Show
        Eugene S. Ostrovsky added a comment - It seems that patch for HARMONY-3876 committed in r542499 is incorrect. It makes launcher to check for -help and -X options, print short usage message and exit without creating VM. Thus VM is unable to print it's detailed information for these options.
        Hide
        Eugene S. Ostrovsky added a comment -

        Working on it.

        Show
        Eugene S. Ostrovsky added a comment - Working on it.

          People

          • Assignee:
            Alexei Zakharov
            Reporter:
            Elena Sayapina
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development