jvm.dll vs java.dll

N

Naresh Agarwal

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
 
R

Roland

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_/ /__/
/ \ /_/ / \
 
N

Naresh Agarwal

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
 
R

Roland

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_/ /__/
/ \ /_/ / \
 
G

Gordon Beaton

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
 
Joined
Apr 11, 2011
Messages
3
Reaction score
0
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top