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

Add a -mainClass parameter to the JAR tool (for easy autorunnable JARs creation)

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 1.2.0, 1.3.0, 1.4.0
    • tools
    • jar
    • b53
    • generic, x86
    • generic, windows_nt

      Name: mc57594 Date: 11/15/99


      java version "1.3beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3beta-O)
      Java(TM) HotSpot Client VM (build 1.3beta-O, mixed mode)



      I'd suggest you add a -mainClass parameter to the JAR tool, so that doing for
      example

      JAR -mainClass xxx.yyy.ZZZClassName output\xxx\yyy\*.class images\*.gif

      would make a jar which when double clicked would run the class
      <xxx.yyy.ZZZClassName>

      then the JAR tool would add the "Main-Class:" header to the manifest.mf
      automatically if -mainClass command line parameter was passed to it
      (Review ID: 97815)
      ======================================================================

            jhangalsunw Jayalaxmi Hangal (Inactive)
            mchamnessunw Mark Chamness (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: