Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2005

Tip: Looking for answers? Try searching our database.

jvm.dll vs java.dll

Thread view: 
Naresh Agarwal - 14 Jun 2005 16:32 GMT
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
Roland - 14 Jun 2005 17:46 GMT
> Hi
>
[quoted text clipped - 9 lines]
> 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.
Signature

Regards,

Roland de Ruiter
` ___      ___
`/__/ w_/ /__/
/  \ /_/ /  \

Naresh Agarwal - 15 Jun 2005 12:14 GMT
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
Roland - 15 Jun 2005 12:43 GMT
> thanks for reply.
>
[quoted text clipped - 3 lines]
> 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.
Signature

Regards,

Roland de Ruiter
` ___      ___
`/__/ w_/ /__/
/  \ /_/ /  \

Gordon Beaton - 15 Jun 2005 13:06 GMT
> 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

Signature

[  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



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.