Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why was java compiler written in C?

 
Monica Shiralkar
Ranch Hand
Posts: 842
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why was java compiler written in C?Why was it the choice for writing java compiler
thanks
 
Ivan Jozsef Balazs
Rancher
Posts: 979
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Was it? How do we know that?

The JVM must have been written in something, that is better portable among several platforms, as Java was intended to be portable and to be ported to several platforms.
What would have been your choice?

If you have a backing JVM you can write (at least portions of the) compiler even in Java.
You can theoretically write a working compiler (maybe step by step) on one platform, and put to use the resulting compiler classes on the other platforms, if the JVMs are available there.
 
Ivan Jozsef Balazs
Rancher
Posts: 979
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A discussion in Stack OVerflow
 
Monica Shiralkar
Ranch Hand
Posts: 842
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic