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.
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.
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!
Whenever JAVA_HOME is not set this will happen, it'll be changed so that JAVA_HOME is not used in the next release.
Sorry, JDK_HOME rather than JAVA_HOME.
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.
Fix in 1.1.8 and 1.2.0
Version 1.1.8 is stable.