title: Why doesn't Sun do a C# to Java byte code compiler?
body: <h2>We Want to Run Our C# Code on the JVM</h2>
  
  <p>My company has a large C# code base. Well over half of this code is our core engine for creating, reading, modifying, calculating and writing Excel workbooks. We frequently get questions from customers and potential customers asking whether we are going to build a Java version of our engine - many of them are not at all interested in the UI. We even have a few customers who have taken the trouble to use our .NET library from their Java applications. </p>
  
  <p>So, we would like to build a Java version of our core engine, ideally without maintaining a separate Java source code base.</p>
  
  <p>Eric Sink <a href="http://www.ericsink.com/bos/Geeks_Rule.html" rel="noreferrer">described this problem</a> very well. I am in a similar position except for the fact that our software license includes royalty free deployment, making Eric's choice of Mainsoft a nonstarter for us.</p>
  
  <p>I have been Googling the likes of <a href="http://www.google.com/search?hl=en&amp;q=%22c%23+to+jvm%22&amp;aq=f&amp;oq=" rel="noreferrer">"c# to jvm"</a> every few months for several years now with no joy. Having spent ~7 years developing similar software for Java, I am confident that the .NET APIs we use in our core engine could easily be encapsulated and we could accomplish everything we need using the Java libraries. So, if we only had a C# -> JVM compiler we could build our core engine for Java and we would no longer have to turn away Java developers who would like to use it.</p>
  
  <p>I am not asking for the technical reasons why Sun does not do a C# compiler. I recognize that Java has no properties or an unsigned 64 bit long, etc... For the sake of argument, just assume that all of these technical issues could be dealt with by extending the JVM and / or other means.</p>
  
  <p>And I am not asking for yet another debate on why one language / stack might be better than the other. The reality in our business is that there are plenty of potential customers using each.</p>
  
  <h2>Why Should Sun do a C# Compiler? (IMO of course)</h2>
  
  <p>Making it easier to run C# code on the Java platform means more developers and more software for the platform. Is there anything more important to the success of a platform? <a href="http://en.wikipedia.org/wiki/Jonathan_I._Schwartz" rel="noreferrer">Jonathan Schwartz</a> is a software guy. I will leave it to others smarter than me to decide whether or not he took on an impossible job as President and CEO of Sun, but having met with Jonathan shortly after he joined Sun my impression is that he understands software and the need for a large base of developers.</p>
  
  <h2>So Why Doesn't Sun do a C# Compiler?</h2>
  
  <ol>
  <li><a href="http://en.wikipedia.org/wiki/Not_Invented_Here" rel="noreferrer">NIH</a> syndrome?</li>
  <li>The ghost of <a href="http://en.wikipedia.org/wiki/Scott_McNealy" rel="noreferrer">Scott McNealy</a>?</li>
  <li>Too many Java developers dislike or distrust anything related to Microsoft?</li>
  <li>They agreed not to as part of taking <a href="http://www.internetnews.com/bus-news/article.php/3334991" rel="noreferrer">the big bucks</a>?</li>
  <li>???</li>
  </ol>
  
  <p>There must be a good reason. I just cannot for the life of me figure out what it is...</p>