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, no registration required.

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
2  
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
add comment

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

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

2 Answers

up vote 14 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
1  
@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
2  
@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
4  
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
show 3 more comments

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
2  
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
1  
@Konrad: I've updated my answer. –  Kevin Apr 29 '11 at 14:30
add comment

Your Answer

 
discard

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.