JNI_CreateJavaVM fails in client jvm, if initial/max heap sizes are specified

Discussion in 'Java' started by Naresh Agarwal, Jun 30, 2005.

  1. Hi

    I've a C++ application on Solaris, which uses JNI Invocation APIs to
    call a Java class.

    This application loads the client JVM
    (/Java_Home/jre/lib/sparc/client/libjvm.so) dynamically, call
    JNI_CreateJavaVM and then call Java classes. While creating VM, I pass
    only classpath as option

    This application works fine.

    However, if I specify the initial and maximum heap sizes (i.e., -Xms
    and -Xmx options) while creating JVM (i.e., while calling
    JNI_CreateJavaVM), the application fails at JNI_CreateJavaVM call.

    Any ideas why this is happening.

    thanks,
    Naresh
     
    Naresh Agarwal, Jun 30, 2005
    #1
    1. Advertising

  2. On 30 Jun 2005 10:36:31 -0700, Naresh Agarwal wrote:
    > if I specify the initial and maximum heap sizes (i.e., -Xms and -Xmx
    > options) while creating JVM (i.e., while calling JNI_CreateJavaVM),
    > the application fails at JNI_CreateJavaVM call.
    >
    > Any ideas why this is happening.


    Not off hand. Post your launcher code.

    /gordon

    --
    [ do not email me copies of your followups ]
    g o r d o n + n e w s @ b a l d e r 1 3 . s e
     
    Gordon Beaton, Jun 30, 2005
    #2
    1. Advertising

  3. Naresh Agarwal

    Chris Uppal Guest

    Naresh Agarwal wrote:

    > However, if I specify the initial and maximum heap sizes (i.e., -Xms
    > and -Xmx options) while creating JVM (i.e., while calling
    > JNI_CreateJavaVM), the application fails at JNI_CreateJavaVM call.


    Unless someone has seen this before then I think you'll have to show code.

    -- chris
     
    Chris Uppal, Jun 30, 2005
    #3
  4. Naresh Agarwal

    Hemal Pandya Guest

    Naresh Agarwal wrote:
    [....]
    >
    > However, if I specify the initial and maximum heap sizes (i.e., -Xms
    > and -Xmx options) while creating JVM (i.e., while calling
    > JNI_CreateJavaVM), the application fails at JNI_CreateJavaVM call.
    >
    > Any ideas why this is happening.


    Are you sure you have got the parameters values right? VM creation
    fails if the minimum heap size is more then the maximum heap size. Try
    starting VM on command line with the same parameters.

    >
    > thanks,
    > Naresh
     
    Hemal Pandya, Jul 1, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. buzz
    Replies:
    0
    Views:
    3,120
  2. Replies:
    5
    Views:
    40,924
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Feb 3, 2007
  3. Michal Slocinski

    Heap dump file size vs heap size

    Michal Slocinski, Mar 25, 2008, in forum: Java
    Replies:
    1
    Views:
    774
    GArlington
    Mar 25, 2008
  4. viki
    Replies:
    6
    Views:
    630
    Erik Wikström
    Jun 28, 2008
  5. Raymond Schanks
    Replies:
    0
    Views:
    597
    Raymond Schanks
    Apr 11, 2010
Loading...

Share This Page