• 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

Java language

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

I want to know in which programming language Java is written ??

Correct me if i am wrong for below findings :

JVM is written in ANSI C
javac is written in Java language.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's no one language a JVM or Java compiler is written in--which one are you asking about?

And welcome to JavaRanch!
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Having worked for a company that licensed and shipped a variant of the JVM from Sun -- I can confirm that the JVM is mostly written in C++, with some written in C, and with some really really small parts in assembly.

Henry
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To make it more clear what David said: "Java" is only a specification. It's written in... English (see The Java Language Specification and The Java Virtual Machine Specification).

There are different implementations of the JVM: ofcourse Sun's JVM which probably most people use, but IBM and HP have their own implementations for their own hardware and software platforms, and there's for example also JRockit, a JVM originally written by BEA (which was bought by Oracle some time ago) optimized for Intel x86 hardware.

Maybe Sun's JVM was largely written in C or C++ with some assembler, but what the others have been written in is not publicly known.

Most of Sun's JVM is open source (see OpenJDK) so you can see the source code if you want to (you don't need any special license or permission to get the source code).
 
rajesh sherla
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK I agree whatever is said.

I know to write anything in Java, simple plain English is used.

But From one of the Sun vendor, they had given that JVM is written in ANSI C and javac(java compiler) is written in Java.

I clearly understand that JVM implementation is confidential. But what about java compiler.

Is there any Specification for Java compiler ??
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

rajesh sherla wrote:I clearly understand that JVM implementation is confidential.


No it isn't, as I wrote. Sun's JVM implementation is almost completely open source, you can download the source code here: OpenJDK. That includes the source code of Sun's Java compiler, which is written in Java.

The Java compiler must follow the rules that are in the Java Language Specification.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic