jvm.dll vs java.dll

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

  1. Hi

    JDK 1.4 provides jvm.dll and java.dll libraries on windows and
    libjvm.so and libjava.so on unix platforms (linux etc.)

    What is difference between 'jvm' and 'java' libraries? I found that
    java.dll is dependent on jvm.dll

    In order to use JNI Invocation API (creating JVM etc.), which library
    should be used?

    thanks & regards,
    Naresh
     
    Naresh Agarwal, Jun 14, 2005
    #1
    1. Advertising

  2. Naresh Agarwal

    Roland Guest

    On 14-6-2005 17:32, Naresh Agarwal wrote:

    > Hi
    >
    > JDK 1.4 provides jvm.dll and java.dll libraries on windows and
    > libjvm.so and libjava.so on unix platforms (linux etc.)
    >
    > What is difference between 'jvm' and 'java' libraries? I found that
    > java.dll is dependent on jvm.dll
    >
    > In order to use JNI Invocation API (creating JVM etc.), which library
    > should be used?
    >
    > thanks & regards,
    > Naresh
    >

    "jvm.dll" is the Virtual Machine that interprets bytecodes and compiles
    to native code when necessary (hotspots).
    "jvm.dll" also contains the JNI_CreateJavaVM entry point, so this is the
    one you need for JNI.

    java.dll contains the code of several native methods in the Java API,
    Object.getClass() for example.
    --
    Regards,

    Roland de Ruiter
    ` ___ ___
    `/__/ w_/ /__/
    / \ /_/ / \
     
    Roland, Jun 14, 2005
    #2
    1. Advertising

  3. thanks for reply.

    I found that jvm.dll does not depend upon java.dll. So if jvm.dll is
    the entry point, how java.dll is loaded. Is it loaded dynamically?

    thanks,
    Naresh
     
    Naresh Agarwal, Jun 15, 2005
    #3
  4. Naresh Agarwal

    Roland Guest

    On 15-6-2005 13:14, Naresh Agarwal wrote:

    > thanks for reply.
    >
    > I found that jvm.dll does not depend upon java.dll. So if jvm.dll is
    > the entry point, how java.dll is loaded. Is it loaded dynamically?
    >
    > thanks,
    > Naresh
    >

    Guess so. java.dll also contains the native code for loading, finding
    and defining Java classes (from .class files), quite important for
    accessing Java's system classes and classes you compiled yourself. I
    think java.dll gets loaded during the startup of the JVM.
    --
    Regards,

    Roland de Ruiter
    ` ___ ___
    `/__/ w_/ /__/
    / \ /_/ / \
     
    Roland, Jun 15, 2005
    #4
  5. On 15 Jun 2005 04:14:39 -0700, Naresh Agarwal wrote:
    > I found that jvm.dll does not depend upon java.dll. So if jvm.dll is
    > the entry point, how java.dll is loaded. Is it loaded dynamically?


    On Linux, libjava.so depends on libjvm.so, but the converse is not
    true:

    $ readelf -d libjava.so
    Dynamic segment at offset 0x208a8 contains 25 entries:
    Tag Type Name/Value
    0x00000001 (NEEDED) Shared library: [libjvm.so]
    [...]

    When the library contains such information, ld.so will load libjvm.so
    automatically when a process loads libjava.so.

    /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 15, 2005
    #5
  6. Naresh Agarwal

    Joined:
    Apr 11, 2011
    Messages:
    3
    need help

    I have develop a c program that use jni to call java methods.
    i want to make myself clear about some important questions, please help me.

    1. jvm.dll is virtual machine..? if yes thn we don't need to have jre (VM ) installed in system to run this application...?
    2. if we dont need the JRE thn what is the minimum set of libraries requried to run application.
    3.and can we place them in same directory with application to run program.

    Reply please.
     
    , Apr 13, 2011
    #6
    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. Kevin Hooke

    Re: Handling both MS JVM and Sun JVM

    Kevin Hooke, Aug 26, 2003, in forum: Java
    Replies:
    2
    Views:
    877
  2. Lasse
    Replies:
    1
    Views:
    700
    Jon A. Cruz
    Jan 5, 2004
  3. Young-Jin Lee

    MS JVM and Sun JVM problem

    Young-Jin Lee, Jan 20, 2004, in forum: Java
    Replies:
    3
    Views:
    575
    Mickey Segal
    Jan 21, 2004
  4. adgarcia13
    Replies:
    2
    Views:
    3,963
    Gordon Beaton
    Jun 28, 2006
  5. davidb
    Replies:
    2
    Views:
    1,025
    davidb
    Aug 30, 2006
Loading...

Share This Page