Brian Zuromski
2005-Dec-01 19:18 UTC
[Fedora-directory-users] JAVA_HOME problems after upgrade
After upgrading I keep getting this when starting the console... ./startconsole -u admin -a http://hostname.domain:10204/ ./startconsole: Unable to find libjava and libjvm in JAVA_HOME. Please ensure that JAVA_HOME is set correctly. It worked in the previous version (7.1) just fine. Are there any dependencies I should be installing?
Nathan Kinder
2005-Dec-01 20:19 UTC
Re: [Fedora-directory-users] JAVA_HOME problems after upgrade
FDS 7.1 included the IBM JVM. FDS 1.0 does not include a JVM. To use Console you need either the 14.2 Sun or IBM JVM on your system with JAVA_HOME set appropriately. -NGK Brian Zuromski wrote:>After upgrading I keep getting this when starting the console... > >./startconsole -u admin -a http://hostname.domain:10204/ > >./startconsole: Unable to find libjava and libjvm in JAVA_HOME. Please >ensure that JAVA_HOME is set correctly. > >It worked in the previous version (7.1) just fine. Are there any >dependencies I should be installing? > > > >-- >Fedora-directory-users mailing list >Fedora-directory-users@redhat.com >https://www.redhat.com/mailman/listinfo/fedora-directory-users > >
Richard Megginson
2005-Dec-01 20:39 UTC
Re: [Fedora-directory-users] JAVA_HOME problems after upgrade
Yes. Please see installation prerequisites here - http://directory.fedora.redhat.com/wiki/Install_Guide Brian Zuromski wrote:>After upgrading I keep getting this when starting the console... > >./startconsole -u admin -a http://hostname.domain:10204/ > >./startconsole: Unable to find libjava and libjvm in JAVA_HOME. Please >ensure that JAVA_HOME is set correctly. > >It worked in the previous version (7.1) just fine. Are there any >dependencies I should be installing? > > > >-- >Fedora-directory-users mailing list >Fedora-directory-users@redhat.com >https://www.redhat.com/mailman/listinfo/fedora-directory-users > >
Kevin M. Myer
2005-Dec-01 20:51 UTC
Re: [Fedora-directory-users] JAVA_HOME problems after upgrade
Quoting Nathan Kinder <nkinder@redhat.com>:> FDS 7.1 included the IBM JVM. FDS 1.0 does not include a JVM. To > use Console you need either the 14.2 Sun or IBM JVM on your system > with JAVA_HOME set appropriately. > > -NGKA suggestion - since Red Hat packages and distributes RHEL with Java RPMs from IBM, and since jpackage-utils puts some nice reasonable defaults in /etc/java/java.conf for Java variables, and since Red Hat now has a directory server that uses Java for management, how about modifying startconsole to check /etc/java/java.conf first? :) The following should hold true: LIBJAVA_DIR=JAVA_LIBDIR LIBJVM_DIR=JAVA_JVMDIR The startconsole script didn''t work for me to automatically detect LIB{JAVA,JVM}_DIR, based on the output of find/sed, so I just hardcoded to the above, which is what they would have ended up as anyway. But after just digging a little bit, the reason appears to be that "find /usr/lib/jvm/java -name ''libjvm.s[ol]''" returns nothing. But: cd $JAVA_HOME (or /usr/lib/jvm/java) find . -name ''libjvm.s[ol]'' returns ./bin/classic/libjvm.so or probably better, find $JAVA_HOME/ -name libjava\.s[ol] works too, so I think the trailing slash after JAVA_HOME is needed. Kevin -- Kevin M. Myer Senior Systems Administrator Lancaster-Lebanon Intermediate Unit 13 http://www.iu13.org
Richard Megginson
2005-Dec-01 21:18 UTC
Re: [Fedora-directory-users] JAVA_HOME problems after upgrade
Sounds good. Will this work on Fedora Core or other linux distros? Kevin M. Myer wrote:> Quoting Nathan Kinder <nkinder@redhat.com>: > >> FDS 7.1 included the IBM JVM. FDS 1.0 does not include a JVM. To >> use Console you need either the 14.2 Sun or IBM JVM on your system >> with JAVA_HOME set appropriately. >> >> -NGK > > > A suggestion - since Red Hat packages and distributes RHEL with Java > RPMs from IBM, and since jpackage-utils puts some nice reasonable > defaults in /etc/java/java.conf for Java variables, and since Red Hat > now has a directory server that uses Java for management, how about > modifying startconsole to check /etc/java/java.conf first? :) > > The following should hold true: > LIBJAVA_DIR=JAVA_LIBDIR > LIBJVM_DIR=JAVA_JVMDIR > > The startconsole script didn''t work for me to automatically detect > LIB{JAVA,JVM}_DIR, based on the output of find/sed, so I just > hardcoded to the above, which is what they would have ended up as > anyway. But after just digging a little bit, the reason appears to be > that "find /usr/lib/jvm/java -name ''libjvm.s[ol]''" returns nothing. > > But: > cd $JAVA_HOME (or /usr/lib/jvm/java) > find . -name ''libjvm.s[ol]'' returns ./bin/classic/libjvm.so > > or probably better, > > find $JAVA_HOME/ -name libjava\.s[ol] > > works too, so I think the trailing slash after JAVA_HOME is needed. > > Kevin
Kevin M. Myer
2005-Dec-01 22:21 UTC
Re: [Fedora-directory-users] JAVA_HOME problems after upgrade
Quoting Richard Megginson <rmeggins@redhat.com>:> Sounds good. Will this work on Fedora Core or other linux distros?I''m not sure how portable it would be with other distros (it should definitely work on FC), but here was what I was thinking: Check /etc/java/java.conf and if it exists try using the values there. Maybe tickle to see if /etc/{redhat,fedora}-release exists first. I''d vote for a "assume nothing but the known distributions/environments where this works approach" (which is to say that if say a /etc/java/java.conf file exists on a Solaris install, don''t blindly assume that the values in it are anywhere near or even related to what exists in a Red Hat java.conf file). For binary packages, this probably means including a RPM dependency for jpackage-utils (which in and of itself could still lead to problems, since you could have that installed but have no JRE installed..). The more ways there are to find where the JRE might be (which may amount to figuring out what the clues are on each distro/OS), the lower the bar to entry becomes and Things Just Work. Kevin -- Kevin M. Myer Senior Systems Administrator Lancaster-Lebanon Intermediate Unit 13 http://www.iu13.org
Richard Megginson wrote:> Yes. Please see installation prerequisites here - > http://directory.fedora.redhat.com/wiki/Install_GuideEven with the IBM J2SDK installed and JAVA_HOME set correctly, the lines: if [ ! -f java -a ! -x java ] then echo "$0: The java program is not in your path, or is not executable." exit 1 fi ... in startconsole are always going to fail. What is probably required are: if [ ! -f $JAVA_HOME/bin/java -a ! -x $JAVA_HOME/bin/java ] then echo "$0: The java program is not in your path, or is not executable." exit 1 fi (see line 69 where it runs the correct java binary -- the test for "-f java" is only going to work if the java binary is in the current directory, not in JAVA_HOME/bin where it should be). -- Del
Richard Megginson
2005-Dec-02 18:09 UTC
Re: [Fedora-directory-users] JAVA_HOME problems after upgrade
Thanks Del - https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=174843 Del wrote:> Richard Megginson wrote: > >> Yes. Please see installation prerequisites here - >> http://directory.fedora.redhat.com/wiki/Install_Guide > > > Even with the IBM J2SDK installed and JAVA_HOME set correctly, > the lines: > > if [ ! -f java -a ! -x java ] > then > echo "$0: The java program is not in your path, or is not executable." > exit 1 > fi > > ... in startconsole are always going to fail. What is probably required > are: > > if [ ! -f $JAVA_HOME/bin/java -a ! -x $JAVA_HOME/bin/java ] > then > echo "$0: The java program is not in your path, or is not executable." > exit 1 > fi > > (see line 69 where it runs the correct java binary -- the test for "-f > java" > is only going to work if the java binary is in the current directory, not > in JAVA_HOME/bin where it should be). >
Richard Megginson
2005-Dec-02 18:11 UTC
Re: [Fedora-directory-users] JAVA_HOME problems after upgrade
Thanks Kevin - https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=174844 Kevin M. Myer wrote:> Quoting Richard Megginson <rmeggins@redhat.com>: > >> Sounds good. Will this work on Fedora Core or other linux distros? > > > I''m not sure how portable it would be with other distros (it should > definitely work on FC), but here was what I was thinking: > > Check /etc/java/java.conf and if it exists try using the values > there. Maybe tickle to see if /etc/{redhat,fedora}-release exists > first. I''d vote for a "assume nothing but the known > distributions/environments where this works approach" (which is to say > that if say a /etc/java/java.conf file exists on a Solaris install, > don''t blindly assume that the values in it are anywhere near or even > related to what exists in a Red Hat java.conf file). For binary > packages, this probably means including a RPM dependency for > jpackage-utils (which in and of itself could still lead to problems, > since you could have that installed but have no JRE installed..). > > The more ways there are to find where the JRE might be (which may > amount to figuring out what the clues are on each distro/OS), the > lower the bar to entry becomes and Things Just Work. > > Kevin >