Forum Stats

  • 3,768,730 Users
  • 2,252,841 Discussions
  • 7,874,701 Comments

Discussions

Please, why the jar decopressing utility is contained only in the entire runtime environment from Or

977233
977233 Member Posts: 8
edited Sep 19, 2016 7:33AM in New To Java

I only need from the user of my program to decompress (not run) the JAR file and obtain the CLASS file and two data files. These he should run with the help of java.exe. Command line is sufficient. Why it is impossible under JRE?

Best Answer

  • TPD-Opitz
    TPD-Opitz Member Posts: 2,465 Silver Trophy
    edited Sep 18, 2016 1:14PM Accepted Answer

    Why do you want to unpack the jar at the users hard drive?

    what about

    java -jar hereYours.jar fqn.of.class.to.Run

    ?

    And finally: Jar files are ordinary ZIP files after all, so any (un)zip utility will do...

    bye

    TPD

Answers

This discussion has been closed.