First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 151884
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Java team <java@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Dick Repasky <rrepasky@lack.ucs.indiana.edu>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
run-java-tools-patch optionally respect java_home instead of gentoo_vm in run-java-tool patch Vlastimil Babka (Caster) 2008-11-08 09:50 0000 593 bytes Details | Diff
ant.patch ant launcher patch patch Vlastimil Babka (Caster) 2008-11-08 09:53 0000 1.38 KB Details | Diff
java-utils-2-eclass.patch eclass patch unsetting RESPECT_JAVA_HOME for java building patch Vlastimil Babka (Caster) 2008-11-08 09:56 0000 500 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 151884 depends on: Show dependency tree
Show dependency graph
Bug 151884 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-10-18 16:01 0000
I consider this a bug, and you probably don't. 

I sometimes need to use ant with jvms that are not distributed by gentoo, and
this worked for years. Now in ant-core-1.6.5-r14 /usr/bin/ant expressly runs
java-config to force the value of JAVA_HOME. I hate that behavior. I want
/usr/bin/ant to honor JAVA_HOME however I set it.

------- Comment #1 From Jakub Moc (RETIRED) 2006-10-18 16:06:07 0000 -------
Yeah, and we prefer to keep the packages in portage working correctly... :P

------- Comment #2 From Vlastimil Babka (Caster) 2006-10-20 14:25:41 0000 -------
We're not using JAVA_HOME anymore because it's tied to your env, you have to
source /etc/profile after changing it, it's not flexible enough - if you set
JAVA_HOME to 1.4 jdk, apps needing 1.5 would break etc. So using java-config in
launchers isn't only the case of ant, but pretty much anything gen-2. The best
thing you can do is to write metadata for your external VM's and put it in
/usr/share/java-config-2/vm - you can base it on some existing one. Then you
can set the VM as your user VM and run stuff with it, or use GENTOO_VM env
variable for temporary changes.

------- Comment #3 From Dick Repasky 2006-11-19 10:48:35 0000 -------
Creating my own metadata profiles in /usr/share/java-config-2/vm hasn't been a
satsifactory experience.  Briefly, I put things that I install myself such as
Sun JVM's in /usr/local.  If I create a metadata profile for such a JVM and
select the JVM as the system JVM, java -version returns the errors:

* Home for VM 'my-sun-j2sdk1.4.2_12' does not exist:
/usr/lib/jvm/my-sun-j2sdk1.4.2_12
* Invalid System VM: my-sun-j2sdk1.4.2_12

What the hell is that?  In the metadata I specified the correct location of the
JVM home, and java-config ignores it and seems to require that all jvm's be
installed in /usr/lib/jvm.  Can you make java-config honor the information
that's in the metadata?  Why specify metadata if they are ignored?

------- Comment #4 From Josh Nichols 2006-11-19 10:56:07 0000 -------
You need a symlink in /usr/lib/jvm to point at the JAVA_HOME of your jdk/jre.

ie ln -s /usr/local/myjdk /usr/lib/jvm/my-sun-j2sdk1.4.2_12

------- Comment #5 From Vlastimil Babka (Caster) 2008-11-08 09:50:13 0000 -------
Created an attachment (id=171084) [edit]
optionally respect java_home instead of gentoo_vm in run-java-tool

This introduces RESPECT_JAVA_HOME variable which, when set, makes every
run-java-tool based launcher use JAVA_HOME instead of GENTOO_VM.

------- Comment #6 From Vlastimil Babka (Caster) 2008-11-08 09:53:15 0000 -------
Created an attachment (id=171085) [edit]
ant launcher patch

This makes ant just run "java" instead of its own detection, so that (in
conjunction with patched java-config) if RESPECT_JAVA_HOME is set, the
run-java-tool launcher will use JAVA_HOME.
Additionally, tools.jar is taken from JAVA_HOME instead of java-config --tools.

------- Comment #7 From Vlastimil Babka (Caster) 2008-11-08 09:56:43 0000 -------
Created an attachment (id=171087) [edit]
eclass patch unsetting RESPECT_JAVA_HOME for java building

To prevent problems with building existing packages due to user's env,
RESPECT_JAVA_HOME is set in the eclass. Packages that on the other hand need it
(icedtea[6]) can set it afterwards.

------- Comment #8 From Vlastimil Babka (Caster) 2008-11-08 10:04:54 0000 -------
*** Bug 217572 has been marked as a duplicate of this bug. ***

------- Comment #9 From Vlastimil Babka (Caster) 2008-11-09 00:21:16 0000 -------
After discussion with betelgeuse, the change is to ant script only, not general
run-java-tool and the variable is called ANT_RESPECT_JAVA_HOME which, if set
and JAVA_HOME is set, it's not overriden.
Commited in ant-core-1.7.1-r2

First Last Prev Next    No search results available      Search page      Enter new bug