Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

in which language java is written

 
untak goel
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in which language java is written?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question only makes sense if you ask about a particular implementation of Java, of course. Sun is only one vendor of Java virtual machines.

But most JVMs are written in C/C++, with a little assembly.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In fact, part of the JVM and other tools are written in Java with a C++/Asm wrapper
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeroen Wenting:
In fact, part of the JVM and other tools are written in Java with a C++/Asm wrapper


Yep, the javac compiler and most of the other tools like javap, javah, etc are, indeed, written in Java. I'm not sure about the claim that part of Sun's JVM is itself written in Java; I suspect that it would come down to a semantic argument at the end, whether a particular bit of code was part of the JVM or part of the library. 99% of the APIs are written in Java, of course, with an occasional native method here and there.
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As EFH, pointed out earlier, Sun's JVM is only one of several. I would assume that other vendors, such as IBM, probably use C/C++ to implement much of the JVM and Java to implement the API.

Layne
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
except for the initial classloader all classloaders are for example written in Java.
While part of the standard API, the JVM itself can't work without them as they're what loads your application classes.

Grey area of course where the standard API is an inseperable part of the JVM
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic