Unable to dlopen libjava.a: No such file or directory on AIX

Unable to dlopen libjava.a: No such file or directory on AIX

Post by altc » Sun, 18 May 2003 02:04:23



Hello,

I'm trying to embed JVM in my application. The program is compiled and
linked without any problem.

During runtime when i try loading the libjvm.a and create the JVM, i get
this error.

Unable to dlopen libjava.a: No such file or directory
Cannot obtain system-specific information

Any suggestions welcome...

-ALTCC

--
Posted via http://dbforums.com

 
 
 

Unable to dlopen libjava.a: No such file or directory on AIX

Post by Fletcher Glen » Sun, 18 May 2003 03:30:51



> Hello,

> I'm trying to embed JVM in my application. The program is compiled and
> linked without any problem.

> During runtime when i try loading the libjvm.a and create the JVM, i get
> this error.

> Unable to dlopen libjava.a: No such file or directory
> Cannot obtain system-specific information

> Any suggestions welcome...

> -ALTCC

> --
> Posted via http://dbforums.com

If libjava.a is not in /usr/lib, then you either need to set an
internal runtime path to the library, or your environment must include
a LD_LIBRARY_PATH or LD_RUN_PATH that contains a path to libjvm.a.

--
                Fletcher Glenn


 
 
 

Unable to dlopen libjava.a: No such file or directory on AIX

Post by Tobias Oe » Sun, 18 May 2003 03:38:53



> Hello,

> I'm trying to embed JVM in my application. The program is compiled and
> linked without any problem.

> During runtime when i try loading the libjvm.a and create the JVM, i get
> this error.

> Unable to dlopen libjava.a: No such file or directory
> Cannot obtain system-specific information

libjava.a sounds like a static library. Are you sure you don't want
libjava.so or some such thing?
Tobias.

--
unix http://www.faqs.org/faqs/by-newsgroup/comp/comp.unix.programmer.html
clc http://www.eskimo.com/~scs/C-faq/top.html
fclc (french): http://www.isty-info.uvsq.fr/~rumeau/fclc/

 
 
 

Unable to dlopen libjava.a: No such file or directory on AIX

Post by Jens.Toerr.. » Sun, 18 May 2003 03:42:30



> I'm trying to embed JVM in my application. The program is compiled and
> linked without any problem.
> During runtime when i try loading the libjvm.a and create the JVM, i get
> this error.
> Unable to dlopen libjava.a: No such file or directory
> Cannot obtain system-specific information

Shouldn't you try to dlopen libjvm.so or libjava.so? .a files aren't
shared libraries, .so files are. And I doubt that you can use dlopen
with non-shared libraries.
                                    Regards, Jens
--
      _  _____  _____

  _  | |  | |    | |
 | |_| |  | |    | |          http://www.physik.fu-berlin.de/~toerring
  \___/ens|_|homs|_|oerring
 
 
 

Unable to dlopen libjava.a: No such file or directory on AIX

Post by altc » Sun, 18 May 2003 05:02:25


ON AIX, all the shared library has "*.a" extension. So it is a shared
library...

Originally posted by Jens Toerring


> > I'm trying to embed JVM in my application. The program is
>     compiled and
> > linked without any problem.

> > During runtime when i try loading the libjvm.a and create the
>     JVM, i get
> > this error.

> > Unable to dlopen libjava.a: No such file or directory
> > Cannot obtain system-specific information

> Shouldn't you try to dlopen libjvm.so or libjava.so? .a files aren't
> shared libraries, .so files are. And I doubt that you can use dlopen
> with non-shared libraries.
>                                     Regards, Jens
> --
>       _  _____  _____

>   _  | |  | |    | |
>  | |_| |  | |    | |          http://www.physik.fu-berlin.de/~t-
>  | |oerringhttp://www.physik.fu-berlin.de/~toerring

  \___/ens|_|homs|_|oerring

--
Posted via http://dbforums.com

 
 
 

Unable to dlopen libjava.a: No such file or directory on AIX

Post by Valentin Nechaye » Sun, 18 May 2003 15:08:45



>> During runtime when i try loading the libjvm.a and create the JVM, i get
>> this error.
>> Unable to dlopen libjava.a: No such file or directory
>> Cannot obtain system-specific information
> Shouldn't you try to dlopen libjvm.so or libjava.so? .a files aren't

AFAIU he doesn't try to load it. libjvm.a does it.
So, if it works at vendor's test systems, it can work on target system,
possibly with LD_LIBRARY_PATH or other crutches.

-netch-

 
 
 

Unable to dlopen libjava.a: No such file or directory on AIX

Post by Robert Clar » Sun, 18 May 2003 16:42:45



> I'm trying to embed JVM in my application. The program is compiled and
> linked without any problem.

> During runtime when i try loading the libjvm.a and create the JVM, i get
> this error.

> Unable to dlopen libjava.a: No such file or directory
> Cannot obtain system-specific information

Sounds like a LIBPATH problem. What do you have it set to? Do you have it
set? Make sure you have *both* the directory containing libjvm.a (usually
.../jre/bin/classic) and the parent of that directory (.../jre/bin) in
there.

AIX allows you to manipulate the LIBPATH variable in your program so you
could always:

    o getenv("LIBPATH") to get any existing setting
    o compute a new value with your two directories appended
    o setenv("LIBPATH=...") to save your new setting

before you try to dlopen() the JVM library. Or you can set the variable in
your environment before you start you program.

- Rob

--
(to email me, remove "warez.")
Please do not send me email copies of newsgroup postings.

 
 
 

1. unable to dlopen libjava.a

I am trying to use JNI to call some Java classes. The C++ code is
compiled as a shared object and called from Netscape Ent Server 3.6.
We have JDK1.2.2 with recent patches applied on AIX 4.3.

The initialise function called by netscape is called correctly, and
the code calls javaCreateVirtualMachine but fails, I get the error
message from Netscape:Unable to dlopen libjava.a

We're at a bit of a loss as to why libjava.a is being called by
dlopen(), but nonetheless have tried a number of things in an attempt
to point the linker/loader at the right files: we've been through a
series of changes to ensure that both LIBPATH and LD_LIBRARY_PATH
contain /usr/java_dev2/jre/bin, and are also passing a
-Djava.library.path=/usr/java_dev2/jre/bin argument to theCreateJavaVM
function.

None of this seems to have any effect. Can any one provide anypointers?
BTW we have an old C++ compiler - 3.6.6 and are using DCE threads for
various legacy reasons.

Thanks for your help

Mark

Sent via Deja.com http://www.deja.com/
Before you buy.

2. Does "echo prompt: | tr -d '\012'" always work?

3. dlopen and libjava libjvm

4. Internal SCSI Imoega Zip drive

5. Unable to dynamically access a function using dlopen

6. virtalhost

7. Unable To See Files In Home Directory

8. Inkjet printer suggestions wanted

9. Unable to download deep files and directories recursively with mget -R command...

10. Unable to download directories & files recursively in ncftp?

11. Please advice: unable to create file/directory

12. Unable to access home directory (Reflection X on shared file system)

13. Unable to open pdf file on AIX