• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JVM doubt

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,

I am thinking that JVM will be operating system dependent.So windows will have corresponding JVM ,Unix will have its own JVM and like that.

Now I want to make sure that whether JVM's are written in Java language or like in c or c++.

and one more quesion that is generally we say that java.lang is the default package.can anybody explain me how it will be added to the classpath by automatically and how does it is available to all programs by default.
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It shouldnt matter to you what the JVM is written in. By default the java.lang package is available to all classes. Once the java.exe file can be executed, the VM should take care of making the necessary classes available for your program - excluding the libraries that you link to. You either provide library links in the classpath or in a manifest file in a jar
 
Ranch Hand
Posts: 212
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The JVM is not written in Java since it needs a JVM to run. Sort of a chicken/egg thing. I believe it is written in C. And yes, the JVM is platform dependent, which is why there are versions for different platforms.
 
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

we say that java.lang is the default package.can anybody explain me how it will be added to the classpath by automatically and how does it is available to all programs by default.



The Java runtime environment has several jars with standard, "bootstrap" classes. When a ClassLoader tries to load a class, it will first look in those bootstrap jars.

For more information, read this technote from Sun.
[ December 31, 2006: Message edited by: Scott Johnson ]
reply
    Bookmark Topic Watch Topic
  • New Topic