cannot start JVM

204 views
Skip to first unread message

jayaprakash kv

unread,
Apr 23, 2007, 6:09:00 AM4/23/07
to jB...@googlegroups.com
Dear All,
I am trying to call a Java program form jbc application using CALLJ. But while running the program i am getting the below error.


Error: cannot start JVM, check LD_LIBRARY_PATH/LIBPATH/PATH and add the location of JVM shared libraries

[526] List '0' is inactive.

Please help me to overcome this error.

Thanks and Regards,
Jayaprakash K V


Jim Idle

unread,
Apr 23, 2007, 12:03:01 PM4/23/07
to jB...@googlegroups.com

Wow, an error message that makes sense (I must have written it ;-)>

 

Of course, it only makes sense if you already know what it means.

 

What it means is that the location of your Java virtual machine is not known to the system. When you use CALLJ, it must create an instance of the JVM in order to load and call the classes.

 

So:

 

1)      You need to add the location of your jvm commands (like java to your PATH environment variable [though this isn’t your issue, you should do it]).

2)      You need to add the location of your JVM shared library into the environment variable used by your system:

a.       AIX – LIBPATH

b.      HPSUX – SHLIB_PATH

c.       Most other UNIX/Linux – LD_LIBRARY_PATH

d.      Windows - PATH

3)      The jvm will be called JVM.DLL, or jvm.so, or jvm.sl etc and will usually be in a subdirectory of somewhere obvious like “Program Files\java\jre1.6_01” and the subdirectory will be called lib.

4)      Login in again to your system with these variables set up and then it will all work

 

Jim

jayaprakash kv

unread,
Apr 24, 2007, 1:28:24 AM4/24/07
to jB...@googlegroups.com
i am using IBM AIX. Therfore i export the below paths,

jsh root ~ -->export LIBPATH=$LIBPATH:/usr/java14/jre/bin  ----------> contains libjava.a

jsh root ~ -->export JBCJVMLIB=/usr/java14/jre/bin/classic/libjvm.a


Even the path has been exported I am getting the below error.

 

Can't load library "/usr/java14/jre/bin/libjava.a", because  load ENOENT on shared library(s) /usr/java14/jre/bin/libjava.a libjvm.a

Can't load library "/usr/java14/jre/bin/libcore.a", because  load ENOENT on shared library(s) /usr/java14/jre/bin/libcore.a


Error: cannot start JVM, check LD_LIBRARY_PATH/LIBPATH/PATH and add the location of JVM shared libraries

[526] List '0' is inactive.



Please help me to sort out this.



Thanks and regards,

Jayaprakash K V
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups "jBASE" group.
> To post to this group, send email to jB...@googlegroups.com
> To unsubscribe from this group, send email to jBASE-un...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
>

Pawel (privately)

unread,
Apr 25, 2007, 8:25:06 AM4/25/07
to jB...@googlegroups.com, jB...@googlegroups.com

Hello Prakash,

 

Those settings in .profile should be enough for you (AIX and IBM 1.4.2 JVM considered):

export JREDIR=$HOME/../jbase/jbase/jdk/jre (set it to your JRE location)

export JRELIB=$JREDIR/bin:$JREDIR/bin/classic

export LIBPATH=$LIBPATH:$JRELIB

export LDR_CNTRL=USERREGS@MAXDATA=0x80000000

export CLASSPATH=$HOME/../tcserver/lib/basicmqbridge.jar:$HOME/../tcserver/ext/connector.jar:$HOME/../tcserver/ext/com.ibm.mq.jar (to obtain MQ connectivity)

 

See more here:http://www-128.ibm.com/developerworks/java/jdk/aix/142/sdkguide.aix32.html#loadjvmforjni

or in documentation provided with jBASE.

 

The most important setting we were missing was LDR_CNTRL. Have a fun :) To obtain more diagnostic information try to invoke JVM with extra options (JBC_JVMOPT or something like that - check out docs).

 

Kind regards

Pawel

----------------------------------------------------
Szukasz gotówki na dowolny cel i bez poręczycieli?
Weź Halogotówkę w 10 minut. Rata już od 35 zł.
Sprawdź! http://klik.wp.pl/?adr=http://adv.reklama.wp.pl/as/halogotowka.html&sid=1115

Pawel (privately)

unread,
Apr 25, 2007, 8:25:06 AM4/25/07
to jB...@googlegroups.com, jB...@googlegroups.com

Hello Prakash,

 

Those settings in .profile should be enough for you (AIX and IBM 1.4.2 JVM considered):

export JREDIR=$HOME/../jbase/jbase/jdk/jre (set it to your JRE location)

export JRELIB=$JREDIR/bin:$JREDIR/bin/classic

export LIBPATH=$LIBPATH:$JRELIB

export LDR_CNTRL=USERREGS@MAXDATA=0x80000000

export CLASSPATH=$HOME/../tcserver/lib/basicmqbridge.jar:$HOME/../tcserver/ext/connector.jar:$HOME/../tcserver/ext/com.ibm.mq.jar (to obtain MQ connectivity)

 

See more here:http://www-128.ibm.com/developerworks/java/jdk/aix/142/sdkguide.aix32.html#loadjvmforjni

or in documentation provided with jBASE.

 

The most important setting we were missing was LDR_CNTRL. Have a fun :) To obtain more diagnostic information try to invoke JVM with extra options (JBC_JVMOPT or something like that - check out docs).

 

Kind regards

Pawel

 

Dnia 24-04-2007 o godz. 7:28 jayaprakash kv napisał(a):

Reply all
Reply to author
Forward
0 new messages