Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Java Gets New Garbage Collector, But Only If You Buy Support

ScuttleMonkey posted more than 4 years ago | from the putting-on-the-squeeze dept.

Java 587

An anonymous reader writes "The monetization of Java has begun. Sun released the Java 1.6.0_14 JDK and JRE today which include a cool new garbage collector called G1. There is just one catch. Even though it is included in the distribution, the release notes state 'Although G1 is available for use in this release, note that production use of G1 is only permitted where a Java support contract has been purchased.' So the Oracle touch is already taking effect. Will OpenJDK be doomed to a feature-castrated backwater while all the good stuff goes into the new Java SE for Business commercial version?"

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered


Seriously Java? (5, Insightful)

jlechem (613317) | more than 4 years ago | (#28142063)

You used to be cool.

Re:Seriously Java? (2, Insightful)

Anonymous Coward | more than 4 years ago | (#28142203)

Too cool for its customers.

Re:Seriously Java? (5, Funny)

JonTurner (178845) | more than 4 years ago | (#28142279)

Write once. Pay everywhere.

Re:Seriously Java? (0)

Anonymous Coward | more than 4 years ago | (#28142711)

I would pay for something that works. Hope Oracle take JavaEE out of the crap it is right now.

Re:Seriously Java? (4, Insightful)

Lord Ender (156273) | more than 4 years ago | (#28142217)

So long as they publish the spec, we can't accuse them of being proprietary. So long as the free version is superior to other similar free technologies, they will still be the market leader. Sounds like they know what they're doing.

Re:Seriously Java? (0)

Anonymous Coward | more than 4 years ago | (#28142257)

Pay for it? Can't someone else do it?

Re:Seriously Java? (0, Troll)

Anonymous Coward | more than 4 years ago | (#28142423)

It gets better. (Or worse, depending on your point of view.)

This version also adds a blacklist to the JRE, so Oracle can ban people from running various applications.

Just what I want to do, give Oracle the power to randomly stop applications I use from running. I wonder how long it will take for Eclipse to "accidentally" make it onto the blacklist?

Re:Seriously Java? (-1, Offtopic)

Anonymous Coward | more than 4 years ago | (#28142527)

Java was never cool. I avoided it 1) because it was missing a lot of features needed to write real programs; 2) I didn't want to support people like Patrick Naughton (http://slashdot.org/articles/99/09/20/0744243.shtml). Paying for Java supports pedophiles.

Re:Seriously Java? (1)

linzeal (197905) | more than 4 years ago | (#28142595)

Does any industry that deals beyond a niche user base really think they can pay more programmers, writers or artists to compete with a billion people online? What is going to end up happening is that companies that cannot make money off hardware, support services or the like on donation or ad-based platforms while supporting open content will perish trying to desperately sell something that no one considers worth buying. Do they really think this is going to bring in more more money than pissing off an entire generation of people who have grown up programming under Java when it was free? How long do you think it is going to take for these features popping up in a forked version, days or weeks?

Re:Seriously Java? (-1, Flamebait)

Anonymous Coward | more than 4 years ago | (#28142607)

the four people still using Java are gonna be well pissed.
[queue the bullshit about Java being as fast as C/C++ and Java being prominent within the banking industry]

Re:Seriously Java? (2)

patro (104336) | more than 4 years ago | (#28142621)

You used to be cool.

Really? When?

Re:Seriously Java? (3, Funny)

bnenning (58349) | more than 4 years ago | (#28142665)

Very briefly around 10 years ago, when it was a clear improvement over C++ and hadn't yet been infested by architecture astronauts.

Re:Seriously Java? (4, Interesting)

theeddie55 (982783) | more than 4 years ago | (#28142681)

java was cool when it was a great idea, then it was implemented. it has never really been all that cool since then.

Re:Seriously Java? (5, Interesting)

clarkkent09 (1104833) | more than 4 years ago | (#28142687)

As per release notes, this is an experimental feature. It may be that Sun intends to provide it only to paid customers or it may be that they want to make sure you don't use it in "production" environment until it's ready and then whine that Java is buggy if it doesn't work 100%.

I don't know which is true but the second possibility seems far more likely to me, making this story completely pointless and unfair - but hey this is slashdot.

Btw, off topic but is it just me or the subjects in replies are showing up as white text on white bg in Firefox but look ok in IE. I even tried in on another pc and same thing.

Let the man answer please... (3, Insightful)

SurfMan (969573) | more than 4 years ago | (#28142075)

With the JavaOne starting this week, it might be a nice opening question on day one... "What the hell are you thinking, mister Schwartz??"

Re:Let the man answer please... (3, Funny)

AKAImBatman (238306) | more than 4 years ago | (#28142135)

"What the hell are you thinking, mister Schwartz??"

I'm thinking he turned to Ellison and said... "Let the Schwartz be with you!"

aha! I knew all along (0)

gbjbaanb (229885) | more than 4 years ago | (#28142077)

... that the old Garbage collector was rubbish - we've been saying it for years, Java uses too much memory, is too slow, is just all about vendor lock-in....

And now, its proven - they've brought out a new GC that's so much better, it might actually fix all the problems with Java! Proof that the old one was pants.


Of course.

The old one was unusable, wasn't it?

We were unable to make anything work properly using Java in the past, yes?

maybe? ... :)

Maybe (1, Interesting)

Anonymous Coward | more than 4 years ago | (#28142087)

Someone can add this to OpenJDK or a fork of OpenJDK?

Garbage collector? (4, Interesting)

smooth wombat (796938) | more than 4 years ago | (#28142089)

As a non-programmer, can someone give a brief explanation of what a garbage collector is as it pertains to programming.

Re:Garbage collector? (5, Informative)

gubers33 (1302099) | more than 4 years ago | (#28142125)

Garbage collection is the process freeing objects that are no longer referenced by the program.

Re:Garbage collector? (5, Informative)

HBI (604924) | more than 4 years ago | (#28142173)

Java hides the details of memory allocation from the programmer. Objects, strings, etc use memory. When they are first used, Java makes sure that the appropriate amounts of memory are allocated for the item in question. When these items are no longer in use, the garbage collector finds them and frees the memory so that it can be used for other parts of the application.

VB is another place where a garbage collector would be found. Ditto .NET.

Forgive my ignorance WAS:re: Garbage collector? (2, Interesting)

Brett Buck (811747) | more than 4 years ago | (#28142445)

I know I am profoundly ignorant and as thus should be modded into oblivion, but I don't do any programming where the memory allocation is variable. Is there a good reason are people really relying on hidden mechanisms to manage it? I would think it would be a lot more robust to keep track of allocation and deallocation explicitly, add when you need, and delete when you don't need, and not count on some generic mechanism. I know it happens, I see the memory leaks, but it would seem eminently avoidable.


Re:Forgive my ignorance WAS:re: Garbage collector? (5, Informative)

publiclurker (952615) | more than 4 years ago | (#28142535)

While in theory, avoiding memory leaks is easy, in practice, it is rather difficult for anything but the most trivial programs. that's one of the reasons why garbage collection was created in the first place.

Re:Forgive my ignorance WAS:re: Garbage collector? (2, Informative)

rdavidson3 (844790) | more than 4 years ago | (#28142589)

Programming in C gives you more control over managing memory, but the price comes if the programmer is not careful about collecting the garbage up afterwards and you'll end up with the application taking more and more memory and your computer will eventually starting slowing down and could start complaining about not enough memory.

Re:Forgive my ignorance WAS:re: Garbage collector? (1)

Junta (36770) | more than 4 years ago | (#28142605)

It requires a great deal of programming discipline, which frankly humanity tends to lack. Absolutely, you can be more resource efficient if you are perfect about manual manipulation, but in practice developer time is sometimes best spent doing other things when the situation isn't one where resource usage efficiency is not a huge factor.

Re:Forgive my ignorance WAS:re: Garbage collector? (1)

Ethanol-fueled (1125189) | more than 4 years ago | (#28142613)

It's better because you can prototype and build stuff much, much quicker without (usually) having to custom-compile on every architecture. Java and C++ are a lot alike, and Java gave a nod to legacy C code with its own printf().

To use a car analogy, stick-shift vs. automatic.

Re:Forgive my ignorance WAS:re: Garbage collector? (4, Insightful)

geekboy642 (799087) | more than 4 years ago | (#28142627)

It would not be more robust.
The more things you have to pay attention to at the nuts-and-bolts level, the fewer things you are able to pay attention to at the business logic level. The key difference between managed languages like Java and non-managed languages like C, is that the uninteresting grunt work is done for you by the compiler. A vast majority of security flaws are related to programmers thinking exactly like you do. Even if the programmer is very highly skilled, memory management is tedious and difficult, and it is impossible to never make a mistake. Mistakes in memory management lead to segfaults or remote exploits.
Non-managed languages should be used only when the performance benefits outweigh the dangers.

Re:Forgive my ignorance WAS:re: Garbage collector? (5, Informative)

hibiki_r (649814) | more than 4 years ago | (#28142689)

Even in modern C++, memory allocation and destruction is commonly done behind the scenes using reference counting pointers.

Whenever you are dealing with anything that resembles a complex data structure, making sure that the programmer has to think very little about memory allocation is a huge boon. Programmer productivity across the alst 50 years hasn't changed much, if we look at statements written per month. The main difference is that 50 years ago, our statements did a lot less than they do now. A programmer that doesn't have to think of memory requirements can spend more time thinking about the actual business requirements, and improving the core algorithms.

Leaving the memory management to a library is also a good way of minimizing the damage that a careless programmer can make. I remember the cost of a bad programmer in a team coding in C: It'd take longer to track his memory leaks, pointer overlaps buffer overruns than it would have taken the more reliable programmers to write the code from scratch. In languages like Java and C#, one has to really be working hard to be a true liability. There's just a lower barrier of entry. In a world that's not filled with uberprogrammers, but barely competent ones, this is a huge boon.

And that's why few shops making business software would even dare to start a new project in a language without garbage collection: Unless you have quite a special team, a great QA process and are memory constrained, you'll be more productive in a language that is further away from the metal.

Re:Garbage collector? (0)

Anonymous Coward | more than 4 years ago | (#28142181)

I'm sure that Wikipedia can supply a nice, concise answer complete with references.

In brief, garbage collection is what allows programmers to be freed up from having to manage memory on their own. The VM keeps track of how memory is being used, and if it thinks that some memory can be freed up, it will release that memory.

Re:Garbage collector? (1)

pak9rabid (1011935) | more than 4 years ago | (#28142207)

As a non-programmer, can someone give a brief explanation of what a garbage collector is as it pertains to programming.

In Java, the garbage collector runs periodically to free up memory associated with objects that are no longer needed. It' a built-in memory management system that frees the programmer from having to worry about managing dynamic memory manually. In theory, it makes it impossible for your applications to contain memory leaks, but comes at the cost of performance (historically at least, this may change that).

Almost (1, Interesting)

professorguy (1108737) | more than 4 years ago | (#28142439)

You can still construct a program with a memory leak in Java.

1. From your Main object, create an object A.
2. Have object A create an object B. Have it pass itself as an argument to the ctor.
3. Have object B keep the reference to object A.

At this point you have 2 references to object A (one from the Main object and one from object B) and 1 reference to object B (from object A).

Now just set object A to null to destroy the reference from Main to A. The reference counter to A drops from 2 to 1 (and object B still has 1). Both objects continue to exist in memory but they cannot be referenced by your program.

Voila! Memory leak in Java.

Re:Almost (0)

Anonymous Coward | more than 4 years ago | (#28142513)

So essentially, you have two objects referencing each other, right? The GC will collect both since the main thread has no access to either one of them. Java garbage collector do not rely on reference counting anymore.

Re:Almost (3, Informative)

3p1ph4ny (835701) | more than 4 years ago | (#28142529)

That works as long as the only strategy used is reference counting. There are others, and I think Java uses a fancy version of mark and sweep.

Re:Almost (4, Informative)

TheRaven64 (641858) | more than 4 years ago | (#28142651)

To clarify, it only works if the strategy is pure reference counting. Mark-and-sweep and reference counting with cycle detection are both special cases of the same generalised algorithm (see the IBM TJ Watson papers for more info). Generally, ref counting + cycle detection plays nicer with virtual memory and non-uniform memory architectures than mark-and-sweep, although this is less true in an aggressively generational system like G1.

Re:Almost (0)

Anonymous Coward | more than 4 years ago | (#28142591)

Even the most basic garbage collectors deal with this already...sheesh

Reference Counting != Garbage Collection (5, Informative)

samweber (71605) | more than 4 years ago | (#28142635)

No, no, no! Creating a cycle of object references does not cause a memory leak in Java!

You are assuming that a garbage collector uses reference counting. However, reference counting doesn't work for the very reason you state, and therefore GCs don't do it that way. They actually check whether an object is usable by the program, and not just whether it has any old reference to it.

Re:Almost (0)

Anonymous Coward | more than 4 years ago | (#28142647)

I think in Java it is the same as in .net, where Garbage collector is not using reference counting to find unused objects but algorithm for finding strongly connected components and deletes unreachable ones.

Re:Garbage collector? (1)

MyLongNickName (822545) | more than 4 years ago | (#28142225)

Essentially the reclaiming of memory. Traditionally when you created complex objects in code, you would have to explicitly release the resources. Otherwise, you had the notorious "memory leaks" that caused your computer to slow down or even crash if memory continually got used and not freed up. garbage collection is an asynchronous process that goes and looks for objects that are no longer referenced and frees up space.

And having programmed back in the days of Borland C, I see why it is needed. I also see that a lot of programmers are just lazy and don't think about their code.

Re:Garbage collector? (1)

immakiku (777365) | more than 4 years ago | (#28142275)

They are a part of memory management. When a program allocates memory, it has to free it. In most programming languages, the programmer will manually decide when memory is freed. This is usually when the memory that was allocated is no longer needed - say you loaded a file to memory to run some calculations and you just finished, so now you free that file from memory because you don't need to access it anymore. That freed area of memory can now be used for other purposes. Java has a built in "garbage collector" that will take care of freeing memory for you. In general, a garbage collector will keep track of each piece of allocated memory; it is responsible for knowing when your program is no longer using the memory and initiate the freeing of that area of memory.

Re:Garbage collector? (2, Informative)

morgan_greywolf (835522) | more than 4 years ago | (#28142283)

Okay, here's a better description: garbage collection is a means of freeing memory by cleaning out old objects (variables, buffers, data structures, code, etc.) the program doesn't need anymore.

Example: I open a file in an application and work with it. While working with it, the programs allocates buffers (temporary holding places) and data structures and so forth in memory. When I'm done, I close the file. The application needs no longer needs all this data associated with the file, so it calls garbage collection routines to free them up.

Re:Garbage collector? (3, Informative)

forkazoo (138186) | more than 4 years ago | (#28142287)

As a non-programmer, can someone give a brief explanation of what a garbage collector is as it pertains to programming.

C++ has two important keywords: "new" and "delete." You use new when creating an object, and when you are done with it, you use delete to free up the memory it was using. (And, depending on the object, it may do some special stuff while being deleted, like close network sockets, or write a log entry about how sad being deleted is.)

Java has a concept of "new," but it doesn't have a "delete." (Well, the concept exists behind the cutain, but programmers never delete things themselves when using Java.) Java assumes that you are more interested in creating stuff, and don't want to be bothered with the minutia of getting rid of it when you no longer care about it. So, the Java run time goes around deleting stuff that seems like it is no longer being used. (Reference count indicates it can no longer be used.) This is called garbage collection. It's a surprisingly tricky, and nuanced process to figure out when stuff should be deleted. You want to be pretty prompt in deleting stuff that is no longer used so it doesn't sit around using memory for no reason. But, you don't want your garbage collector to be so manic about cleaning things up that the actual program doesn't get enough CPU time to get anything done. You also want a garbage collector to be fairly predictable. It's great if it usually has a low overhead, but terribly if it occasionally goes insane and locks everything up for three minutes under some use cases.

This new garbage collector is a little more sane, a little quicker and a little less manic. For many well written programs, the difference won't be that huge because they shouldn't creating and abandoning enough stuff for garbage collector to really matter. At least, that's my assumption. If I ever actually meet a well written program, I'll be able to verify that. :)

Re:Garbage collector? (0)

Anonymous Coward | more than 4 years ago | (#28142319)

When you instantiate an object (or a variable in other languages), some memory is reserved for this object. In C/C++ for instance, If you don't pay attention to free this assigned memory once you don't use this object/variable anymore, memory can run out quickly leading to a slow machine at best and a crash at worst, and you have to free that memory explicitly. In Java it is automatically detected by the Virtual Machine and freed. However, this VM memory management (garbage collection is a type of memory management) is not perfect and certainly needs improvements.

Re:Garbage collector? (4, Informative)

KeithIrwin (243301) | more than 4 years ago | (#28142369)

When computer programs need to keep track of information, they store it in the computer's memory. The information they store is generally arranged into structures. In object-oriented languages like Java, these structures are called objects. Every object has to have its own place in memory, called an address. Two different objects cannot use the same space in memory at the same time. When a program has a new object that it needs to create, it has to know where to put it. To do this, it uses a system which allocates some memory for it. When the program is done with the object, it should be deallocated so that the same memory can later be used for a different object. If objects are not deallocated when they are done being used, then the program will grow to take up more and more memory over time until the computer runs out of memory. This is called a memory leak.

There are two main scheme for deallocating an object's memory once the program is done with it. Older programming languages use explicit memory deallocation, meaning that when the program is done with an object, it says so. This can unfortunately be somewhat problematic. If a program forgets to say that it's done with an object, then that object never gets deallocated and the program leaks memory. If the program says that it's done with an object when some other part of the program is still using the object, then a new object of a different type might be written over the old object but because the other part of the program doesn't know this has happened, all sorts of odd problems can occur.

To solve this many newer languages including Java use a technique called garbage collection. In a garbage collecting language, the program does not explicitly say when it is done with an object. Instead the garbage collection system examines the cross-references between different objects to determine whether or not it is still possible for the program to use a particular object. If using it is impossible, then the system will deallocate it. In most systems, the garbage collection doesn't run continually swooping up every new bit of space the moment it becomes available, but instead just runs periodically clearing out anything which has become unusable since the last time it ran.

Re:Garbage collector? (0)

Anonymous Coward | more than 4 years ago | (#28142441)

I'm unhappy with the other explanations people are giving you, so here's a different one.

Imagine that a computer's available memory is like a big empty lot that you (the programmer) can build a bunch of houses on. Every time your program needs to remember a number or a piece of text, you have to put it in a house. If you run out of places to build houses, you'd better be able to take down the ones you no longer need, because otherwise the program has to stop running.

A garbage collector is an automatic program-within-a-program. It keeps a close eye on whatever you're doing, and whenever it notices that you no longer need a house you've built, it takes it down automatically, so you can build a new house there.

Obviously, the garbage collector needs to be very smart. If it takes down too few houses on each pass, your program will run very slowly, or stop working. If it takes down too many, your program will try to use resources that no longer exist, and then it will certainly crash. Garbage collectors are hard to write, and people get paid huge piles of money to figure out how to make them as smart as possible.

The G1 collector is a newer, better, smarter type of garbage collector that will probably make Java programs run faster and use less memory. This is something that everyone wants, so Sun/Oracle can get away with charging money for it, because people will pay.

Re:Garbage collector? (0)

Anonymous Coward | more than 4 years ago | (#28142451)

As a non-programmer, can someone give a brief explanation of what a garbage collector is as it pertains to programming.

As a non-programmer, why do you care?

Re:Garbage collector? (2, Informative)

bjourne (1034822) | more than 4 years ago | (#28142465)

A gc (garbage collector) is what programmers use instead of manually handling memory. In non-gc languages such as C programmers have to spend a lot of time being careful not to inadvertently create memory leaks. So programming in languages with gc is generally faster than in those without.

The drawback is that memory is often handled less efficiently by the gc than by the programmer so the program becomes slower and uses more memory. However that depends on the quality of the gc. It is quite easy to write a gc, but that one probably will have awful performance. Writing a good is harder and takes more time. Writing one with performance that handles memory as good as a skilled programmer handling manual allocation is exceptionally hard and requires man-years in effort.

It's like a chess engine, most programmers can write one but if you want one that can match a human or even Big Blue then you need to spend some time on it. So from Oracles perspective, it very much makes sense to try and monetize their high performance gc even if it's a shitty move overall. Most chess players has no use for a chess engine stronger than grandmaster level. But there are professional players out there who has a genuine need for a more challenging chess engine and would pay good money for it. In a similar vein most Java programmers can live with the default gc, but some big enterprises will feel they need a better one and pay lotsa $$$ for it even if the performance gain is only 5-10%.

Re:Garbage collector? (1, Funny)

Anonymous Coward | more than 4 years ago | (#28142501)

Hey, all of you sitting above my post. Yes, all of you who replied to that moron! Thanks for wasting all that screen real estate so you can feel smart explaining to the layman something he could have JustFuckingGoogled!

Troll'd. All 'o' ya!

Re:Garbage collector? (1)

ultrabot (200914) | more than 4 years ago | (#28142659)

Hey, all of you sitting above my post. Yes, all of you who replied to that moron! Thanks for wasting all that screen real estate so you can feel smart explaining to the layman something he could have JustFuckingGoogled!

Indeed. Seeing explanations for trivial driver like this is even more annoying than people asking about it. Please at least *attempt* to keep slashdot as "news for nerds"...

Re:Garbage collector? (4, Funny)

drinkypoo (153816) | more than 4 years ago | (#28142517)

So, which pay-for-answers site do you plan to post the responses on? Or are you feeding a plagiarism detector?

Re:Garbage collector? (2, Informative)

mikael (484) | more than 4 years ago | (#28142633)

When you create objects to represent information consisting of things like character strings, arrays, lists and hierarchical trees, you make a system call to create a new list of data objects.

In languages like 'C', this would be like 'malloc( number of bytes) ' or 'calloc( number of bytes)'. You would then have to match every such call with an equivalent 'free( pointer)' to ensure the memory was freed. Failure to do so leads to 'memory leaks' where the memory space is allocated but incorrectly freed (caused by uninitialised pointer variables, missing calls or faulty decision making).

C++ tried to fix this by having 'new' and 'delete' operators which were intended to be called through the constructor (a function automatically called with the object is created) and the destructor (a function automatically called when the object is destroyed). However, there were times when these functions also needed to be called throughout the lifetime of the object, so memory leak problem crept in again.

JAVA attempts to fix C++ by eliminating the need for the 'delete' operator. Since every function always belongs to a class, and consequently a data object, data always belongs to a data object. Memory is allocated as before, but when a data object ceases to be in use (return of a function call), it is placed in the garbage area. At periodic intervals, the garbage collector is called and all the allocated memory blocks are collected and freed. The disadvantage is that an application could build up a large amount of "garbage memory" and could freeze for several seconds while this process occurred.

In this day and age of "green" businesses... (5, Funny)

thomasdz (178114) | more than 4 years ago | (#28142099)

Shouldn't we have "recycling collection" instead of "garbage collection"?
C'mon guys all those big 1MB and 4MB malloc()s are being shipped over to third world countries to be disassembled into bits and bytes. We should be recycling things HERE.... not throwing them away for Java to come and pick up.

No malloc( )s (1)

professorguy (1108737) | more than 4 years ago | (#28142227)

Java doesn't have malloc( ). That's why it needs an integrated garbage collector. It keeps track of the references to objects that have been instantiated. When the counter reaches zero, the object is automagically removed from memory without explicit programming required. No malloc( ) or free( ) necessary.

Re:No malloc( )s (1, Insightful)

Anonymous Coward | more than 4 years ago | (#28142291)


Re:No malloc( )s (-1, Redundant)

Anonymous Coward | more than 4 years ago | (#28142327)


Re:No malloc( )s (-1, Redundant)

Anonymous Coward | more than 4 years ago | (#28142491)


Re:No malloc( )s (1)

infamous_blah (1224522) | more than 4 years ago | (#28142619)

It keeps track of the references to objects that have been instantiated. When the counter reaches zero, the object is automagically removed from memory without explicit programming required.

Garbage collection in Java does NOT use reference counting. Although there are various GC implementations, they are all tracing collectors. When the collector runs, it traces objects reachable from the rootset. Anything not reachable is garbage and eligible for collection.

Re:No malloc( )s (2, Informative)

kailoran (887304) | more than 4 years ago | (#28142713)

Not only did you not get the joke, you also have some misconceptions about how the Java GC works. There is no counter, instead the program state is analysed for unreachable objects. Also, memory is not freed immediately, but some unspecified time later (i.e. during the next GC cycle)

We buy... (1, Insightful)

Anonymous Coward | more than 4 years ago | (#28142103)

We buy garbage, instead of the real product these days? :)

Troll? (5, Funny)

iamhigh (1252742) | more than 4 years ago | (#28142117)

If you post a troll comment to an article tagged troll, do you get insightful mods?

In Soviet Russia, article trolls you!

Re:Troll? (2, Informative)

keithjr (1091829) | more than 4 years ago | (#28142419)

Only if the article actually is a sensationalist piece of trolling. Sun is releasing an experimental feature to a subset of customers rather than the entire world. And Oracle does not own Sun yet, since the deal has not even been finalized, and therefore is not making decisions about Java.

Slashdot, you disappoint me. Again.

This was BEA's model with JRockit (4, Interesting)

MarkEst1973 (769601) | more than 4 years ago | (#28142119)

JRockit has all kinds of monitoring features, memory profilers, and other useful metrics built into the JRE, but you need a license key to unlock them. Core Java was always free. You pay for the value-added stuff.

Perhaps (5, Interesting)

alexborges (313924) | more than 4 years ago | (#28142157)

"Will OpenJDK be doomed to a feature-castrated backwater while all the good stuff goes into the new Java SE for Business commercial version?""

Perhaps. But now that its GPL, maybe IBM, RH and the rest of Java's stakeholders will get onto making openjdk better than oracle's. Ill sure contribute: this is a strategic need for the foss movement.

RIP Java..we hardly knew ye. (-1, Troll)

Anonymous Coward | more than 4 years ago | (#28142159)

RIP Java, we hardly knew ye.

Java is great. If the garbage collector runs correctly, it should take the entire Java language, and of course, garbage collect it, where it belongs.

Java was a great language, for those too poor to afford a real compiler, or development suite.

It had no good debugger, no usable UI interface, and a log of crap 'class libraries' one had to include to get even simple applications running.


Re:RIP Java..we hardly knew ye. (1, Funny)

Anonymous Coward | more than 4 years ago | (#28142461)

It had no good debugger, no usable UI interface

I think the UI interface of the ATM machine where you enter your PIN number runs Java.

Re:RIP Java..we hardly knew ye. (0)

Anonymous Coward | more than 4 years ago | (#28142649)

Nope, not even close..embedded systems generally run C/C++, there is no room for java bloat.

It's "experimental" (5, Insightful)

ensignyu (417022) | more than 4 years ago | (#28142193)

To try G1, specify these command line options:

-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC

I don't see anything obvious preventing you from using it (no license/support keys?), it's just not recommended since it's experimental. If you're crazy enough to use it on a production server, you better have a support contract so Sun/Oracle can fix any problems that come along. That seems reasonable.

Although it'd be better if they just said "don't use it for production, period."

Re:It's "experimental" (3, Informative)

fatp (1171151) | more than 4 years ago | (#28142433)

It is the tradition of Oracle to distribute software with all functionality (including those separately licensed expensively) and let the user to make sure they don't use unlicensed features.

Re:It's "experimental" (3, Interesting)

Anonymous Coward | more than 4 years ago | (#28142729)

For those who need this spelled out:

1. Distribute working but unlicensed software
2. Encourage developers to use the software
3. Audit companies using said software
4. Profit!

We've gone through more than one episode that starts with: "shite -- we have to rip out this proprietary Oracle crap or pay another X (usually 6+ figures) per year in licensing fees.

The more devious method Oracle also uses is:

1. Package licensed software components into specific products
2. Change products, moving commonly used components into rarely licensed products
3. Notify customers right before negotiating new license
4. Profit!

Re:It's "experimental" (1)

Seakip18 (1106315) | more than 4 years ago | (#28142511)

Or better, don't even distribute it in the FREAKIN' JDK OR JRE.

You want to release it? Sell it as a stand alone patch or jar. Don't sneak it it into the jdk or jre and start making us ask "Is Java evil now?" Well, unless it comes to memory allocation....

Re:It's "experimental" (4, Insightful)

deraj123 (1225722) | more than 4 years ago | (#28142551)

I don't know...the release notes specifically say:

Although G1 is available for use in this release, note that production use of G1 is only permitted where a Java support contract has been purchased.

On the other hand, I was unable to find any specific mention of G1 anywhere in the licensing agreement. However, I did find this:

Sun grants you a non-exclusive, non-transferable, limited license without license fees to reproduce and use internally Software complete and unmodified for the sole purpose of running Programs.

If anyone is able to point out in the actual licensing where the quote from the release notes is backed up, I'd be interested. (text near the second quote there did allow for "exceptions" and "supplemental terms" - but I wasn't able to find any pertaining to G1)

Oh you Smelly Software Socialists! (4, Funny)

Dystopian Rebel (714995) | more than 4 years ago | (#28142197)

I just know you're going to make a lengthy complaint thread of this.

If you would simply put down your Silver Surfer comics, comb the crumbs and insects out of your beards, cut your straggly hair, have a bath and a good scrub, and eagerly learn all the new technologies as our Marketing department invents them (and disposes of the old technologies), we could see the dawn of a New Age of incredibly rich CEOs and VPs who live in mansions, collect cars, race boats and planes, and in general protect the freedoms that your betters fought so hard to establish.

The meek shall inherit my EULA.

Pull your head out of your ass (5, Informative)

Anonymous Coward | more than 4 years ago | (#28142199)

The G1 collector is still a "work in progress" so they are suggesting that you use it *in production* only if you have a support contract with Sun (Oracle?). This is not a big deal. You can still use it, just enable it with "-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC" on the command line...

Tony Soprano in charge (5, Funny)

Alzheimers (467217) | more than 4 years ago | (#28142255)

Meet Vinny and Guido, my business associates in the waste management business.

You see, it's like this. I gotta eat. My kids gotta eat. Vinny and Guido's families have to eat.

We know where you live. It's a nice place, big houses, fancy cars. You can afford to eat, very well.

You wouldn't your neighboorhood to fall victim to all sorts of garbage dumpers, would you? How about a recycling plant, right next to where you work?

No? Well, I'm sure you'll understand when I say that it is in your best interest to respect our business model. Or else, Vinny and Guido might have to go hungry for a bit. And I assure you, they get very unfriendly when they get hungry.


Re:Tony Soprano in charge (5, Funny)

frank_adrian314159 (469671) | more than 4 years ago | (#28142553)

That's a real nice production server you got here. It'd be a shame to see something unfortunate happen to it. I mean a server room's a dangerous place, ain' it? You got cables and electricity around and, well... accidents happen, if you know what I mean.

Especially with garbage lyin' around all over your memory. Pipes could get clogged, tables could fill up, processes could meet an untimely demise... you know what I'm talking about.

Now for a very reasonable fee, we can see that your garbage is collected regularly. It's a very small fee, once you think about what could happen if you didn't have folks like us around to help you. We'll see that this very nice production server continues to run in tip-top shape. Yes, our small garbage collection fee could help you avoid all sorts of unpleasantness...

It's still experimental (5, Interesting)

MrEricSir (398214) | more than 4 years ago | (#28142265)

Methinks they just want to make damn sure nobody uses this feature in a production environment. This is more of a sneak peek for paying customers who are contractually bound against using this in a production environment.

If this was included in the standard distribution, then people would use it no matter what the documentation said. And then Sun would be saddled with bug reports and whining.

Get 'r done takes money (2, Insightful)

dazedNconfuzed (154242) | more than 4 years ago | (#28142289)

The ongoing problem with FOSS is that hard, un-cool, gritty, vital work ultimately takes money to do right. Cool gets projects only so far; money is needed for viable completion.

Re:Get 'r done takes money (1)

drinkypoo (153816) | more than 4 years ago | (#28142579)

That's still not a problem. Numerous companies have demonstrated a willingness to pony up for directed development when necessary.

I got an offer! (1)

Sybert42 (1309493) | more than 4 years ago | (#28142707)

Anyone who thinks the singularity will (make this moot && come before 10 years are up), don't reply to this! Now that's cool.

suprised???? (-1, Troll)

Anonymous Coward | more than 4 years ago | (#28142305)

did anyone really think Oracle was going to continue to release fully featured JDKs for free?????.....this is why the day Oracle bought Sun, i started learning C#....

Re:suprised???? (3, Insightful)

KerberosKing (801657) | more than 4 years ago | (#28142505)

did anyone really think Oracle was going to continue to release fully featured JDKs for free?????.....this is why the day Oracle bought Sun, i started learning C#....

lol, yes because C# is owned by a much more FOSS-friendly company. Microsoft would never charge to support experimental features in production-code.

Sun products are not as "free" as on might think.. (0)

Anonymous Coward | more than 4 years ago | (#28142383)

...if you for example take a look at the proprietary-only MySQL workbench or their OpenSolaris distribution which is hyped as a developer OS but requires you to buy a support contract if you want to get basic security updates e.g. for Firefox or OpenSSL.

Oracle::Java == MS::VB6 (1)

olderphart (787517) | more than 4 years ago | (#28142415)

This is your notice that Oracle will control the future Java trajectory for the benefit of Oracle. It's only going to get worse. There will be poison candy like this GC, strategic API and ABI changes, and just a world of hurt. I survived IBM, DEC, and MS hegemonies, and I've been paying attention. It's gonna happen.

However, as a nakedly proprietary platform, it's possible the academic world will back off from its embrace of Java in favor of unowned platforms. One can hope.

Use restrictions (1)

Adrian Lopez (2615) | more than 4 years ago | (#28142443)

This wouldn't bug me as much if the new garbage collector were only included as part of a paid-for distribution, but the fact that they're charging for the way it's used rather than for the right to obtain a copy of it makes me worry about additional restrictions on use being added in the future. I hope there's enough people making backups of all of Sun's open source software.

Harmful to open source and small businesses (1)

jeichels (805414) | more than 4 years ago | (#28142499)

If Oracle monetizes Java too harshly, small businesses may not use it and will opt for other open source languages. Java open source projects and Linux could take a dive over time due to lack of new project interest. The one company that likes this the most is likely Microsoft. As businesses are likely going to have to pay for a language, they may as well go for a highly integrated one. C# may become more palatable.

Not Oracle touch (0)

Anonymous Coward | more than 4 years ago | (#28142503)

Sun started monetizing on Java few months prior to even buyouts were discussed - I support/maintain a bunch of Java based applications and Sun notified us that Java versions will no longer be supported for free and we would need to buy a JavaSE for Business (JFB) contract if we needed support. This applies not only to older versions but also to newest ones - no version is going to be supported on Windows and Linux for free and without support the Solaris bundled versions will be supported for lesser period than before.
They have also begun to make JES only work/supported on Solaris - so if you want JES you need to buy Solaris and Sun Server by definition.

G1 is already in OpenJDK (5, Informative)

TeaCurran (575365) | more than 4 years ago | (#28142509)

G1 is in the latest OpenJDK builds. Since it is GPL you are free to use it without any license restrictions.

The note in the release notes is only saying that Sun won't officially support it in their releases without a support contract.

If you are concerned, use OpenJDK.

Maybe Mono isn't that "bad" for Open Source after (1)

melted (227442) | more than 4 years ago | (#28142663)

Maybe Mono isn't that "bad" for Open Source after all. A little competition will put a damper on stupid shakedown attempts like this one.

Why would you call it G1? (2, Insightful)

Sangbin (743373) | more than 4 years ago | (#28142727)

Developers may search for JRE on Android...which is also called G1.

Do you really want mixed results on Google search for "G1 Java"?
Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account