<p>How much less libraries are there for Mono than for Java?</p>

<p>I lack the overview over both alternatives but I have pretty much freedom of choice for my next project. I'm looking for hard technical facts in the areas of</p>

<ul>
<li>performance (for example, I'm told Java is good for threading, and I hear the runtime code optimization has become very good recently for .NET)</li>
<li><i>real world</i> portability (it's both meant to be portable, what's Catch-22 for each?)</li>
<li>tool availability (<a href="http://en.wikipedia.org/wiki/Continuous_integration" rel="noreferrer">CI</a>, build automation, debugging, IDE)</li>
</ul>

<p>I am especially looking for what you actually experienced in your own work rather than the things I could google. My application would be a back-end service processing large amounts of data from time series.</p>

<p>My main target platform would be Linux.</p>

<p><strong>Edit:</strong>
<em>To phrase my question more adequately, I am interested in the whole package (3rd party libraries etc.), not just the language. For libraries, that probably boils down to the question "how much less libraries are there for Mono than for Java"?</em></p>

<hr>

<p>FYI, I have since chosen Java for this project, because it seemed just more battle-worn on the portability side and it's been around for a while on older systems, too. I'm a tiny little bit sad about it, because I'm very curious about C# and I'd love to have done some large project in it, but maybe next time. Thanks for all the advice.</p>

[{'answer_id': 61562, 'author': 'Brad Wilson', 'author_id': 1554, 'author_profile': 'https://Stackoverflow.com/users/1554', 'pm_score': 4, 'selected': False, 'text': '<p>I think the question is phrased incorrectly. C# vs. Java is much less interesting in terms of cross-platform usage than is (a) which platforms you need to support, and (b) considering the core libraries and available third party libraries. The language is almost the least important part of the decision-making process.</p>\n'}, {'answer_id': 61565, 'author': 'Ben Collins', 'author_id': 3279, 'author_profile': 'https://Stackoverflow.com/users/3279', 'pm_score': 8, 'selected': True, 'text': '<p>Well....Java is actually more portable.  Mono isn\'t implemented everywhere, and it lags behind the Microsoft implementation significantly.  The Java SDK seems to stay in better sync across platforms (and it works on more platforms).  </p>\n\n<p>I\'d also say Java has more tool availability across all those platforms, although there are plenty of tools available for .NET on Windows platforms.</p>\n\n<p><strong>Update for 2014</strong></p>\n\n<p>I still hold this opinion in 2014.  However, I\'ll qualify this by saying I\'m just now starting to pay some attention to Mono after a long while of not really caring, so there may be improvements in the Mono runtime (or ecosystem) that I haven\'t been made aware of. AFAIK, there is still no support for WPF, WCF, WF, of WIF. Mono can run on iOS, but to my knowledge, the Java runtime still runs on far more platforms than Mono.  Also, Mono is starting to see some much improved tooling (Xamarin), and Microsoft seems to have a much more cross-platform kind of attitude and willingness to work with partners to make them complimentary, rather than competitive (for example, Mono will be a pretty important part of the upcoming OWIN/Helios ASP.NET landscape).  I suspect that in the coming years the differences in portability will lessen rapidly, especially after .NET being open-sourced.</p>\n\n<p><strong>Update for 2018</strong></p>\n\n<p>My view on this is starting to go the other way.  I think .NET, broadly, particularly with .NET Core, has started to achieve "portability parity" with Java.  There are efforts underway to bring WPF to .NET Core for some platforms, and .NET Core itself runs on a great many platforms now.  Mono (owned by Xamarin, which is now owned by Microsoft) is a more mature and polished product than ever, and writing applications that work on multiple platforms is no longer the domain of deep gnosis of .NET hackery, but is a relatively straightforward endeavor.  There are, of course, libraries and services and applications that are Windows-only or can only target specific platforms - but the same can be said of Java (broadly).  </p>\n\n<p>If I were in the OP\'s shoes at this point, I can think of no reason inherent in the languages or tech stacks themselves that would prevent me from choosing .NET for any application going forward from this point.</p>\n'}, {'answer_id': 61567, 'author': 'jodonnell', 'author_id': 4223, 'author_profile': 'https://Stackoverflow.com/users/4223', 'pm_score': 5, 'selected': False, 'text': "<p>Java actually is as cross-platform as everyone says it is.  There's a JVM implementation for just about any mainstream OS out there (even Mac OS X, finally), and they all work really well.  And there's tons of open source tools out there that are just as cross platform. </p>\n\n<p>The only catch is that there are certain native operations you can't do in Java without writing some DLLs or SOs.  It's very rare that these come up in practice.  In all those cases, though, I've been able to get around it by spawning native processes and screen-scraping the results.</p>\n"}, {'answer_id': 61571, 'author': 'GEOCHET', 'author_id': 5640, 'author_profile': 'https://Stackoverflow.com/users/5640', 'pm_score': 6, 'selected': False, 'text': "<p>I actually develop in .NET, run all my tests first on Mono, and then on Windows. That way I know my applications are cross platform. I have done this very successfully on both ASP.NET and Winforms applications.</p>\n\n<p>I am not really sure where some people get the impression Mono is so horrible from, but it certainly has done it's job in my cases and opinions.It is true you will have a bit of lag for the latest and greatest inventions in the .NET world, but so far, .NET 2.0 on Windows and Linux is very solid for me.</p>\n\n<p>Keep in mind there are obviously many quirks to this, but most of them come from making sure you are writing portable code. While the frameworks do a great job of abstracting away what OS you are running on, little things like Linux's case sensitivity in paths and file names takes a bit of getting used to, as do things like permissions.</p>\n\n<p>.NET is definitely very cross platform due to Mono based on my experiences so far.</p>\n"}, {'answer_id': 61607, 'author': 'AlexeyMK', 'author_id': 5021, 'author_profile': 'https://Stackoverflow.com/users/5021', 'pm_score': 3, 'selected': False, 'text': "<p>Java was designed to be cross-platform; C#/.Net wasn't.  When in doubt, use the tool that was designed for your purpose.</p>\n\n<p>EDIT: in fairness, .NET was designed to work on embedded/PC/Server environments, so that's SORT of cross-platform.  But it wasn't designed for Linux.</p>\n"}, {'answer_id': 61724, 'author': 'warren_s', 'author_id': 6255, 'author_profile': 'https://Stackoverflow.com/users/6255', 'pm_score': 3, 'selected': False, 'text': "<p>I'm going to say Java as well. If you look at it in terms of maturity, a lot more time and effort has been expended by Sun (and others) in getting the JVM to work on non-Windows platforms. </p>\n\n<p>In contrast, Mono is definitely a second class citizen in the .NET ecosystem.</p>\n\n<p>Depending on who your target customers are, you may also find there is real pushback against using Mono - does Novell offer the same kind of vendor support for Mono that you would get for Java or .NET on Windows?</p>\n\n<p>If you were primarily targeting hosting your service on Windows, it would make sense to be considering this choice, but since you're targeting Linux primarily, it seems like kind of a no-brainer to me.</p>\n"}, {'answer_id': 61810, 'author': 'George V. Reilly', 'author_id': 6364, 'author_profile': 'https://Stackoverflow.com/users/6364', 'pm_score': 2, 'selected': False, 'text': "<p>There are other language choices too. I've become quite fond of Python, which works well on Windows, Linux, and Mac, and has a rich set of libraries.</p>\n"}, {'answer_id': 61815, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 3, 'selected': False, 'text': '<p>I would vote for Java being more portable than C#.  Java definitely also has a very rich set of standard libraries.  There is also a broad set of open source 3rd party libraries out there such as those provided by the Jakarta project (<a href="http://jakarta.apache.org/" rel="noreferrer">http://jakarta.apache.org/</a>).</p>\n\n<p>All the usual suspects exist for CI, Unit testing, etc too.  Cross platform IDE support is also very good with the likes of Eclipse, Netbeans, IntelliJ IDEA etc.</p>\n'}, {'answer_id': 61829, 'author': 'Kendall Helmstetter Gelner', 'author_id': 6330, 'author_profile': 'https://Stackoverflow.com/users/6330', 'pm_score': 3, 'selected': False, 'text': '<p>To add a bit more to the conversation, Java is more portable if you remain about one version behind - Java 5 still has many excellent features so you can wait for Java 6 and still have a lot of range in terms of language and libraries to develop with.  The Mac is the primary platform that can take some time to catch up to the latest Java version.</p>\n\n<p>Java also has an excellent <a href="http://www.jcp.org" rel="noreferrer">standards body</a> that intelligently grows the platform based on input from many different companies.  This is an oft overlooked feature but it keeps even new features working well across multiple platforms and provides a lot of range in library support for some esoteric things (as optional extensions).</p>\n'}, {'answer_id': 61852, 'author': 'Swaroop C H', 'author_id': 4869, 'author_profile': 'https://Stackoverflow.com/users/4869', 'pm_score': 3, 'selected': False, 'text': '<p>I\'ve been asking the same question off-late and IMHO, .NET/Mono seems to be a better option simply because <a href="http://www.mono-project.com/Companies_Using_Mono" rel="noreferrer">Mono has a great track record for cross-platform desktop applications</a> (as opposed to Java) and of course, <a href="http://tirania.org/blog/" rel="noreferrer">Mono is improving by leaps and bounds</a> these days.</p>\n'}, {'answer_id': 61866, 'author': 'Giovanni Galbo', 'author_id': 4050, 'author_profile': 'https://Stackoverflow.com/users/4050', 'pm_score': 3, 'selected': False, 'text': '<p>I think the answer is "it depends."  Java runs on just about anything, but .NET/Mono are (IMHO) a better framework for the desktop.  So I guess the answer really depends on what platforms you plan on targeting.</p>\n'}, {'answer_id': 264997, 'author': 'damageboy', 'author_id': 9172, 'author_profile': 'https://Stackoverflow.com/users/9172', 'pm_score': 2, 'selected': False, 'text': '<p>While Mono has its <a href="https://stackoverflow.com/questions/18450/is-mono-ready-for-prime-time#264959">share of problems</a> I think it has a better cross-platform compatibility story especially IF you have reliance on native platform invocation.</p>\n\n<p>There are not enough words on Stack Overflow to stress how much smoother it is to get something native called and executed in .NET/Mono on (at least in my experience 3...) multiple platforms vs. the equivalent Java effort.</p>\n'}, {'answer_id': 448793, 'author': 'Gatorhall', 'author_id': 39527, 'author_profile': 'https://Stackoverflow.com/users/39527', 'pm_score': 4, 'selected': False, 'text': "<p>Java is a better choice for Cross-Platform development.</p>\n\n<ul>\n<li><p>Performance. Java and .Net have similar performance level due to the virtual machine, but JVM normally has better performance because of years and years optimization.</p></li>\n<li><p>Library. Although this depends on your task, Java has much more open source or third party libraries available there. For server App, J2EE, Spring, Struts, etc. For GUI, although .Net provides Win32 layer API but this causes compatibility issues. Java has Swing, SWT, AWT, etc. It works in most cases.</p></li>\n<li><p>Compatibility. This is the key issues that need to be considered when develop the cross-platform program. Two issue: first, platform compatibility. Java still wins since JDK is well maintained by single and original company Sun. Mono is not maintained by MS, so you have no guarantee yet for update compatibility. 2. Backward compatibility. Sun maintains a good reputation on their backward compatibility, although sometimes this seems too rigid and slows the pace.</p></li>\n<li><p>Tools. Java has good cross-platform IDEs. Netbeans, Eclipse, etc. Most of them are free. VS Studio is good but only on Windows, and not cost a bit. Both of them provides good unit tests, debugs, profiles, etc.</p></li>\n</ul>\n\n<p>Hence I'd suggest that Java is a better choice. As a show case, there are some famous desktop cross-platforms apps developed by Java: Vuze, Limewire, BlogBridge, CrossFTP, not to mention those IDEs. As to .Net, I have limited knowledge on such success apps.</p>\n"}, {'answer_id': 8211739, 'author': 'Rui Marques', 'author_id': 379556, 'author_profile': 'https://Stackoverflow.com/users/379556', 'pm_score': 2, 'selected': False, 'text': "<p><strong>Gatorhall</strong> do you have some data to back that up?</p>\n\n<blockquote>\n  <p><em>Performance. Java and .Net have similar performance level due to the virtual machine, but JVM normally has better performance because of years and years optimization.</em></p>\n</blockquote>\n\n<p>Background: I'm a Windows guy since Windows 3.1 and currently a Linux user (still running Windows 7, great OS, on a VM for Visual Studio 2010 and other tools).</p>\n\n<p>The point: me and a lot of users (windows, linux, etc) I know, may disagree from you. Java tends to perform slower even on a linux desktop application, ASP.NET perform's faster that java server pages many of the times. Some may agree that even non-compiled PHP performs better i several scenarios.</p>\n\n<p>Java is more cross-platform? I have no doubts about this (the history back this on), but faster (not saying .NET is) not so certain and I would like to see some real benchmarks. </p>\n"}, {'answer_id': 9049008, 'author': 'Justin', 'author_id': 332026, 'author_profile': 'https://Stackoverflow.com/users/332026', 'pm_score': 7, 'selected': False, 'text': '<p>Mono does a better job at targeting the platforms I want to support. Other than that, it is all subjective.</p>\n\n<p>I share C# code across the following platforms:\n- iOS (iPhone/iPad)\n- Android\n- The Web (HTML5)\n- Mac (OS X)\n- Linux\n- Windows</p>\n\n<p>I could share it even more places:\n- Windows Phone 7\n- Wii\n- XBox\n- PS3\n- etc.</p>\n\n<p>The biggie is iOS since <a href="http://xamarin.com/monotouch">MonoTouch</a> works fantastically. I do not know of any good way to target iOS with Java. You cannot target Windows Phone 7 with Java, so I would say that the days of Java being better for mobile are behind us.</p>\n\n<p>The biggest factor for me though is personal productivity (and happiness). C# as a language is years ahead of Java IMHO and the .NET framework is a joy to use. Most of what is being added in Java 7 and Java 8 has been in C# for years. JVM languages like Scala and Clojure (both available on the CLR) are pretty nice though.</p>\n\n<p>I see Mono as a platform in it\'s own right (a great one) and treat .NET as the Microsoft implementation of Mono on Windows. This means that I develop and test on Mono first. This works wonderfully.</p>\n\n<p>If both Java and .NET (Mono let\'s say) were Open Source projects without any corporate backing, I would choose Mono over Java every time. I believe it is just a better platform.</p>\n\n<p>Both .NET/Mono and the JVM are great choices, although I would personally use some other language than Java on the JVM.</p>\n\n<h1>My take on some of the other comments:</h1>\n\n<p><strong>Issue: Performance.</strong></p>\n\n<p>**Answer: Both the JVM and the CLR perform better than detractors say they do. I would say that the JVM performs better. Mono is generally slower than .NET (though not always).</p>\n\n<p>I personally would take ASP.NET MVC over J2EE any day both as a developer and an end-user. Support for <a href="http://www.mono-project.com/Release_Notes_Mono_2.10#Google_Native_Client_Support">Google Native Client</a> is pretty cool too. Also, I know that poor GUI performance for desktop Java apps is supposed to be a thing of the past but I keep finding slow ones. Then again, I could say the same for WPF. GTK# is plenty fast though so there is no reason they have to be slow.</p>\n\n<p><strong>Issue: Java has a larger ecosystem of libraries available.</strong></p>\n\n<p><strong>Answer: Probably true, but it is a non-issue in practice.</strong></p>\n\n<p>Practically every Java library (including the JDK) runs just dandy on .NET/Mono thanks to <a href="http://www.ikvm.net/">IKVM.NET</a>. This piece of technology is a true marvel. The integration is amazing; you can use a Java library just like it was native. I have only had to use Java libraries in one .NET app though. The .NET/Mono ecosystem generally offers more than I need.</p>\n\n<p><strong>Issue: Java has better (broader) tools support</strong></p>\n\n<p><strong>Answer: Not on Windows. Otherwise I agree. MonoDevelop is nice though.</strong></p>\n\n<p>I want to give a shout-out to <a href="http://monodevelop.com/">MonoDevelop</a>; it is a jewel. MonoDevelop integrates most of the tools I want use including code completion (intellisense), Git/Subversion integration, support for unit tests, SQL integration, debugging, easy refactoring, and assembly browsing with on-the-fly decompilation. It is wonderful to use the same environment for everything from server-side web to mobile apps.</p>\n\n<p><strong>Issue: Compatibility across platforms.</strong></p>\n\n<p><strong>Answer: Mono is a single code-base across all platforms, including Windows.</strong></p>\n\n<p>Develop for Mono first and deploy to .NET on Windows if you like. If you compare .NET from MS to Java though then Java has the edge in terms of consistency across platforms. See next answer...</p>\n\n<p><strong>Issue: Mono lags .NET.</strong></p>\n\n<p><strong>Answer: No it does not.</strong> IMHO, this is an often stated but incorrect statement.</p>\n\n<p>The Mono distribution from Xamarin ships with C#, VB.NET, F#, IronPython, IronRuby, and I think maybe Boo out of the box. The Mono C# compiler is completely up to date with MS. The Mono VB.NET compiler does lag the MS version. The other compilers are the same on both platforms (as are other .NET languages like Nemerle, Boo, and Phalanger (PHP) ).</p>\n\n<p>Mono ships with a lot of the actual Microsoft written code including the Dynamic Language Runtime (DLR), Managed Extensibility Framework (MEF), F#, and ASP.NET MVC. Because Razor is not Open Source, Mono currently ships with MVC2 but MVC3 works on Mono just fine.</p>\n\n<p>The core Mono platform has kept pace with .NET or many years and the compatibility is impressive. You can use the full C# 4.0 language and even some C# 5.0 features today. In fact, Mono often leads .NET in many ways.</p>\n\n<p>Mono implements parts of the CLR spec that even Microsoft does not support (like 64 bit arrays). One of the most exciting new pieces of technology in the .NET world is <a href="http://en.wikipedia.org/wiki/Microsoft_Roslyn">Rosylyn</a>. Mono has offered the C# compiler as a service for many years. Some of what Rosylyn offers is available via <a href="http://wiki.sharpdevelop.net/NRefactory.ashx">NRefractory</a> as well. An example of were Mono is still ahead would be the SIMD instructions to accelerate gaming performance.</p>\n\n<p>Microsoft does offer a number of products on top of .NET that are not available in Mono which is were the misconception about Mono lagging comes from. Windows Presentation Foundation (WPF), Entity Framework (EF), WCF (Windows Communication Foundation) are examples of products which do not work, or are poorly supported, on Mono. The obvious solution is to use cross-platform alternatives like GTK#, NHibernate, and ServiceStack instead.</p>\n\n<p><strong>Issue: Microsoft is evil.</strong></p>\n\n<p><strong>Answer: True. So what.</strong></p>\n\n<p>Many people offer the following reasons to avoid using Mono:</p>\n\n<p>1) You should not use Mono because Microsoft tech should be avoided</p>\n\n<p>2) Mono sucks because it does not let you use every technology that Microsoft offers</p>\n\n<p>To me, it is clear that these statements are incompatible. I reject the first statement but will skip that argument here. The second statement is true of all .NET alternatives.</p>\n\n<p>The JVM is a great platform and the explosion of JVM languages is awesome. Use what makes you happy. For now, that is often .NET/Mono for me.</p>\n'}]
['https://Stackoverflow.com/questions/61559', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2077/']