Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 353895 - >=dev-java/java-config-2.1.11 tries to use a JRE for building when set as system vm
Summary: >=dev-java/java-config-2.1.11 tries to use a JRE for building when set as sys...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Java team
Depends on:
Reported: 2011-02-06 19:23 UTC by Agostino Sarubbo
Modified: 2011-02-07 09:20 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2011-02-06 19:23:26 UTC
* Package:    dev-java/ant-antlr-1.8.1
 * Repository: gentoo
 * Maintainer:
 * USE:  amd64 elibc_glibc kernel_linux multilib userland_GNU
!!! ERROR: The javac executable was not found in the Java path
 * Using: sun-jre-bin-1.6
 * Disabling all optional ANT_TASKS
Warning: Unable to determine tools.jar location.
  If build fails because sun.* classes could not be found,
  Make sure you are using a JDK, not JRE as your user/system VM.
  and that you have java-config version 2.0.30 or above installed.
Unable to locate tools.jar. Expected to find it in /opt/sun-jre-bin-

but i have tools.jar:

amd64box quassel # find / -iname "tools.jar"

I see that it search tools.jar "under" sun-jre-bin and not icedtea but i have also jre:

[I] dev-java/sun-jre-bin
     Available versions:  (1.6)!s ~!s
        {X alsa jce nsplugin odbc}
     Installed versions:!s(11:27:02 24/01/2011)(X alsa nsplugin -jce -odbc)

Add as a block because is a depend
     Description:         Sun's Java SE Runtime Environment
Comment 1 Agostino Sarubbo gentoo-dev 2011-02-06 19:24:20 UTC
sorry for final bad paste
Comment 2 Krzysztof Pawlik (RETIRED) gentoo-dev 2011-02-06 19:32:27 UTC
Looks like an issue with java-config:

java-utils-2.eclass-# variables:
java-utils-2.eclass-# EANT_GENTOO_CLASSPATH - calls java-pkg_getjars for the value and adds to the
java-utils-2.eclass-#                         gentoo.classpath property. Be sure to call
java-utils-2.eclass-#                         java-ant_rewrite-classpath in src_unpack.
java-utils-2.eclass:# EANT_NEEDS_TOOLS - add tools.jar to the gentoo.classpath. Should only be used
java-utils-2.eclass-#                    for build-time purposes, the dependency is not recorded to
java-utils-2.eclass-#                    package.env!
java-utils-2.eclass-# JAVA_PKG_NO_BUNDLED_SEARCH - Don't search for bundled jars or class files
java-utils-2.eclass-# *ANT_TASKS - used to determine ANT_TASKS before calling Ant.
java-utils-2.eclass-    for atom in ${gcp}; do
java-utils-2.eclass-            cp="${cp}:$(java-pkg_getjars ${getjarsarg} ${atom})"
java-utils-2.eclass-    done
java-utils-2.eclass:    [[ -n "${EANT_NEEDS_TOOLS}" ]] && cp="${cp}:$(java-config --tools)"
java-utils-2.eclass-    if [[ ${cp} ]]; then
java-utils-2.eclass-            # It seems ant does not like single quotes around ${cp}
java-utils-2.eclass-            cp=${cp#:}

Could you post the output of `java-config --tools'? For me it's:

nelchael@s-lappy .../portage/eclass$ java-config --tools
Comment 3 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2011-02-06 22:01:05 UTC
The problem is that due to changes for bug 315039, java-config now respect system vm setting for build if possible. And if it's a JRE, it will use it too, although JRE is not enough for building :/ This needs to be fixed. The workaround is to either set icedtea as system VM, or set it as preferred build vm (see )
This should not block resin though.
Comment 4 Agostino Sarubbo gentoo-dev 2011-02-07 09:20:01 UTC
(In reply to comment #2)
> Could you post the output of `java-config --tools'? For me it's:

Nothing output for me