Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 190742 - /usr/bin/jar (jar) linked to run-java-tool
Summary: /usr/bin/jar (jar) linked to run-java-tool
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-30 04:14 UTC by Thomas Soares
Modified: 2007-08-30 08:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Soares 2007-08-30 04:14:15 UTC
On both of my two machines that are running Gentoo, /usr/bin/jar is linked to run-java-tool, which I believe is used to run the "java" command, not "jar".  This is breaking emerge of some packages that use Java, including db and swi-prolog--basically, they are trying to do a "jar cf ..." that seems to be translated into a "java cf ..." command that results in a class not found error.  This problem with the link is possibly a result of emerging sun-jdk-1.6, which I did on both boxes before noting the problem.

Reproducible: Always
Comment 1 Thomas Soares 2007-08-30 04:18:18 UTC
It appears that /usr/bin/javadoc is also linked to run-java-tool.
Comment 2 Josh Nichols (RETIRED) gentoo-dev 2007-08-30 04:21:36 UTC
That isn't a bug, that /usr/bin/jar points to /usr/bin/run-java-tool.

/usr/bin/run-java-tool is part java-config, our tool for managing nearly everything java related.

All the java tools, ie java, jar, javac, javadoc, etc, etc, are symlinks to this. The script does magic to determine what VM should be used, based on your environment, and what tool you were trying to invoke.

You should probably include the specific errors that you are getting, along with emerge --info.
Comment 3 Thomas Soares 2007-08-30 05:21:26 UTC
The problem seems to be in run-java-tool itself.  If I open a shell and run the command "jar", the output I get is exactly the same as for "java", i.e.:

   Usage: java [-options] class [args...]
              (to execute a class)
      or  java [-options] -jar jarfile [args...]
              (to execute a jar file)
   ...etc...

and in fact "jar -version" gives the exact output you expect from "java -version":

   java version "1.5.0_12"
   Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
   Java HotSpot(TM) Client VM (build 1.5.0_12-b04, mixed mode)


If I do "/opt/sun-jdk-1.5.0.12/bin/jar", I get the output that you'd expect from "jar":

   Usage: jar {ctxu}[vfm0Mi] [jar-file] [manifest-file] [-C dir] files ...
   Options:
       -c  create new archive
       ...etc...

So basically, "jar" is being interpreted by run-java-tool as "java".  The "javadoc" tool exhibits the same behvior.
Comment 4 Petteri Räty (RETIRED) gentoo-dev 2007-08-30 08:26:08 UTC
(In reply to comment #2)
> 
> You should probably include the specific errors that you are getting, along
> with emerge --info.
> 

Please give the following info and reopen, emerge --info, the output of which jar  and the output of qcheck java-config-2