Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 May 2009 07:00:55 +1200
From:      Jonathan Chen <jonc@chen.org.nz>
To:        Maho NAKATA <chat95@mac.com>
Cc:        freebsd-java@freebsd.org
Subject:   Re: openjdk dies with: could not find libjava.so as root
Message-ID:  <20090526190055.GA17574@osiris.chen.org.nz>
In-Reply-To: <20090526.205337.193713045.chat95@mac.com>
References:  <20090510210726.C9DE52840C@chen.org.nz> <20090526.164036.55849859.chat95@mac.com> <20090526.205337.193713045.chat95@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 26, 2009 at 08:53:37PM +0900, Maho NAKATA wrote:
> Hi
> I cannot launch openjdk java as root
> 
> # which java
> /usr/local/openjdk6/bin/java
> root# java
> Error: could not find libjava.so
> Error: could not find Java 2 Runtime Environment.
> root# pkg_info | grep openjdk
> openjdk6-b16_1      Sun\'s java 6 virtual machine release under the GPL v2
> 
> however as normal user:
> % which java
> /usr/X11R6/bin/java
> % java -version
> openjdk version "1.6.0-internal"
> OpenJDK Runtime Environment (build 1.6.0-internal-maho_26_may_2009_11_16-b00)
> OpenJDK 64-Bit Server VM (build 11.0-b17, mixed mode)
> 

Something strange about your environment? On my system it looks like:

    osiris-~,6:59am> which java
    /usr/local/bin/java
    osiris-~,6:59am> java -version
    openjdk version "1.6.0-internal"
    OpenJDK Runtime Environment (build
    1.6.0-internal-root_24_may_2009_16_24-b00)
    OpenJDK 64-Bit Server VM (build 11.0-b17, mixed mode)
    osiris-~,6:59am> su -
    Password:
    osiris-~,6:59am# which java
    /usr/local/bin/java
    osiris-~,6:59am# java -version
    openjdk version "1.6.0-internal"
    OpenJDK Runtime Environment (build
    1.6.0-internal-root_24_may_2009_16_24-b00)
    OpenJDK 64-Bit Server VM (build 11.0-b17, mixed mode)

Is you LD_LIBRARY_PATH set?
-- 
Jonathan Chen <jonc@chen.org.nz>
----------------------------------------------------------------------
                         Power corrupts, Absolute Power is pretty neat



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090526190055.GA17574>