Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 35910 - java-config does not work inside a cron job
Summary: java-config does not work inside a cron job
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Jason A. Mobarak (RETIRED)
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 31468
  Show dependency tree
 
Reported: 2003-12-15 18:52 UTC by Adrian Almenar
Modified: 2004-01-09 14:41 UTC (History)
1 user (show)

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 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.