Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

I am curious; can Java be referred to as a managed language? I am mainly thinking about the Microsoft model when it comes to unmanaged versus managed code (say native vc++ to C#). With the similarities between C# and Java as high-level languages, is it correct to call Java a managed language as well?

share|improve this question

migrated from stackoverflow.com Apr 29 '11 at 14:27

This question came from our site for professional and enthusiast programmers.

Please define "managed language". It's impossible to answer this question without a precise definition of what a "managed language" is. –  Jörg W Mittag Apr 29 '11 at 18:16

2 Answers 2

up vote 15 down vote accepted

Yes. Java is considered a managed programming language as it's sandboxed well by the JVM. But the term "managed code" is microsoft specific.

share|improve this answer
I would flip this answer. (1) "Managed code" is Windows-Only and (2) Java runs elsewhere than Windows. I'm not sure that the JVM's running under windows actually use Windows official Managed Code. –  S.Lott Apr 29 '11 at 14:34
@S.Lott Mono also uses this terminology on non-Windows platforms. So no, not “Windows-Only”. –  Konrad Rudolph Apr 29 '11 at 14:47
@Konrad: That's still on the CLI, not a JVM. It isn't Windows-specific, but it's still a reasonable question. –  David Thornley Apr 29 '11 at 15:00
@S.Lott I think Microsoft uses “managed code” more as an umbrella term rather than tying it to a specific implementation (IL, CLR). I may be mistaken though. “Managed” for me simply implies that execution of the code is “safe” because it relies on checking of pointer accesses etc. By that definition, JVM execution would also be managed. –  Konrad Rudolph Apr 29 '11 at 15:04
Neither Java nor .Net assume incompetence on the part of developers, they just abstract away memory management. The term managed code comes form automatic memory management, i.e. garbage collection. It's not a marketing term (".Net" is the marketing term). –  Steve Haigh Apr 30 '11 at 10:08

Yes. A managed language is a language that runs in its own container.

Java is a managed language because you've got the JVM and in .NET you've got the CLR.

The term "managed code" seems to be something Microsoft specific, have a look at the following wikipedia article.

share|improve this answer
I don’t think any definition of “managed” actually hinges on the presence of a garbage collector. –  Konrad Rudolph Apr 29 '11 at 14:28
@Konrad: I've updated my answer. –  Kevin Apr 29 '11 at 14:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.