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
It appears that /usr/bin/javadoc is also linked to run-java-tool.
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.
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.
(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