[rhelv6-list] jar command for .war archives missing from JDK
Bryan J Smith
b.j.smith at ieee.org
Wed Dec 12 02:46:36 UTC 2012
On Tue, Dec 11, 2012 at 7:19 PM, MJang <mike at linuxexam.com> wrote:
> Folks,
> I've been working with some .war archives, and wanted to use the jar command
> to unpack, modify, and repack them. My understanding is that the jar command
> should exist in an appropriate JDK RPM.
> So I installed the java-1.6.0-openjdk RPM. The jar command isn't there. I
> didn't see it in the java-1.7.0-openjdk RPM either (at least as built for
> CentOS 6.2).
> I found the jar command in the JDK RPM downloaded from Oracle/Sun, but that
> made me wonder -- is the jar command available from any Red Hat native RPM?
> Did I miss something?
Yes.
o Short Answer
Install "java-1.6.0-openjdk-devel" (note the "-devel" at the end)
o Details ...
Per Koji [1], you'll note the common JPackage Project [2] nomenclature ...
java-(version)-(distribution)[-(subpackage)]
The common subpackages are ...
[-none] = JRE
-demo = Demo programs
-devel = JDK
-javadoc = Documentation
-src = Source Code
Which means for OpenJDK 1.6.0, respectively ...
java-1.6.0-openjdk <== Only contains the run-time
java-1.6.0-openjdk-demo
java-1.6.0-openjdk-devel <== JDK, this is what you're looking for
java-1.6.0-openjdk-javadoc
java-1.6.0-openjdk-src
If the "openjdk" distribution seems like it should mean JDK,
understand this is, again, JPackage Project subpackage nomenclature.
E.g., since you mention CentOS, then you're only getting OpenJDK in
the main channel. But if you have a Red Hat Enterprise subscription,
you'll have the child channel "Supplementary." This channel is
"special" in that Red Hat does not provide the software, but it is
provided so ISVs can leverage RHN/Portal to distribute packages (long
story, I won't try to explain further). So you would have packages
such as ...
java-1.6.0-ibm
java-1.6.0-ibm-devel
...
java-1.6.0-sun
java-1.6.0-sun-devel
...
Sun is now Oracle, and package names may change based on release date
(let alone the Java from BEA several years back as well). The
"openjdk" is just the distribution label, like "ibm" and "sun"
("oracle"). Remember, not all systems would want the full JDK, and
only need the run-time, hence why the SPEC products sub-packages. No
difference than typical RPM "-devel" packages as well (some are just
header files, and others are far more support, binaries, etc..).
Now even though you run CentOS, if you have the Sun-Oracle binary, you
can use the SRPMS/SPEC file from the JPackage Project to produce the
same subpackages. I've done this on several occasions, although for
ISV certification on Red Hat, you might want to stick with the ones in
Supplementary.
-- bjs
P.S. The one subpackage that differs between ISVs and OpenJDK is the
browser plug-in. Long story short, the source code provided for
OpenJDK from Sun-Oracle doesn't exactly cover the browser plug-in (I
won't try to go into more details). So for most ISVs, you'll have the
subpackage "-plugin" while for OpenJDK, it's a separate package,
"icedtea-web" [3].
[1] http://koji.fedoraproject.org/koji/buildinfo?buildID=360484
(latest OpenJDK 1.6.0)
[2] http://www.jpackage.org/
[3] http://koji.fedoraproject.org/koji/packageinfo?packageID=11822
--
Bryan J Smith - Professional, Technical Annoyance
b.j.smith at ieee.org - http://www.linkedin.com/in/bjsmith
----------------------------------------------------------
Computers are precise, but not accurate, and make mistakes
due to lack of input, as lack of awareness and observation
More information about the rhelv6-list
mailing list