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

jar command line option to specify a main-class (without manifest file)

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.0, 1.4.0
    • tools
    • jar
    • generic, x86
    • generic, windows_nt

      Name: dbT83986 Date: 03/12/99


      I'd like to be able to create a jar file with a main-class
      without having to make up a manifest file. I'm not sure if
      this option should be made incompatible with having a manifest
      file, or if the specified main class should override any
      main class in the maifest file (if any).

      That way, I can make up a single standalone app, and

      javac *.java
      jar cMf TestClass Test.jar *.class

      and have a ready-to-go .jar file
      (Review ID: 53831)
      ======================================================================

      Name: jl125535 Date: 01/28/2003


      The current process is also error-prone. You have to manually create a manifest
      file, specify a main class there, then use the m option to include the
      hand-created manifest with the resulting jar file. Any typos in the manual
      manifest will cause problems.
      (Review ID: 159516)
      ======================================================================

            bristor Dave Bristor (Inactive)
            dblairsunw Dave Blair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: