Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 35910

Summary: java-config does not work inside a cron job
Product: Gentoo Linux Reporter: Adrian Almenar <aalmenar>
Component: Current packagesAssignee: Jason A. Mobarak (RETIRED) <aether>
Status: RESOLVED FIXED    
Severity: normal CC: bugzilla.gentoo.dominik
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 31468    

Description Adrian Almenar 2003-12-15 18:52:22 UTC
If java-config --javac its called from a cron job it simply doesnt work since when running from cron its used the basic enviroment:
--------------
SHELL=/bin/sh
PATH=/usr/bin:/bin
PWD=/home/aalmenar
SHLVL=1
HOME=/home/aalmenar
LOGNAME=aalmenar
_=/bin/env
--------------

java-config should read info from /etc/env.d/20java if ~/.gentoo/java doesnt exists.
Comment 1 Jason A. Mobarak (RETIRED) gentoo-dev 2003-12-15 19:08:49 UTC
I think the problem is that java-config is getting the "JAVA_HOME" environment variable from the the actual environment still -- so this should be fairly easy to correct.
Comment 2 Dominik Diesch 2003-12-21 03:30:07 UTC
Just for the record since I guess it has the same cause: when using java-config --jdk-home from within an init script I also only get the error message
jc_options: No JDK_HOME set!
Comment 3 Jason A. Mobarak (RETIRED) gentoo-dev 2003-12-29 01:50:15 UTC
Whenever JAVA_HOME is not set this will happen, it'll be changed so that JAVA_HOME  is not used in the next release.
Comment 4 Jason A. Mobarak (RETIRED) gentoo-dev 2003-12-29 01:51:49 UTC
Sorry, JDK_HOME rather than JAVA_HOME.
Comment 5 Jason A. Mobarak (RETIRED) gentoo-dev 2004-01-01 04:42:41 UTC
This has been fixed for JAVA_HOME, I need to generalize it and apply to all functions that look for environment vars in order to determine JVM settings.
Comment 6 Jason A. Mobarak (RETIRED) gentoo-dev 2004-01-02 13:18:22 UTC
Fix in 1.1.8 and 1.2.0
Comment 7 Jason A. Mobarak (RETIRED) gentoo-dev 2004-01-09 14:41:30 UTC
Version 1.1.8 is stable.