Java Gets New Garbage Collector, But Only If You Buy Support
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?"
You used to be cool.
Hold up, wait a minute, let me put some pimpin in it
With the JavaOne starting this week, it might be a nice opening question on day one... "What the hell are you thinking, mister Schwartz??"
We buy garbage, instead of the real product these days? :)
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."
Put a fork() in her she's done!
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.
Can we get a "-1 Wrong" moderation option?
WHOOOOSH
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.
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.
Just another "DOJ fascist authoritarian totalitarian bootlicker" -- Zeio
Developers may search for JRE on Android...which is also called G1.
Do you really want mixed results on Google search for "G1 Java"?
Protecting processes running in the same VM from each other may not seem terribly useful now, but Java was originally designed to be used in embedded controllers, where the JVM would *be* the operating system, and where processes had to be protected from each other without the help of a hardware memory management unit.
FWIW, I also beg to differ about the difficulty of manual memory management. In C++ it is usually very easy, as long as you're consistent about doing deallocations in destructors. I once had to write a 40,000+ line C++ program, with lots of dynamic memory management going on; once development was complete, I ran a complete test suite under Purify, and found 5, yes, five, memory leaks. Considering that most leaks are the result of mis-handled object ownership, which is an issue that garbage collection does not eliminate in general, you should be careful about your design, *and* use memory analyzers like OptimizeIt, even when developing in a GC environment.
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.
Ok... so I allocate object A. Then I allocate object B, C, and D that all reference A but aren't aware of eachother. Then I release D, and don't know whether to release A, so now A needs to have some sort of reference counting mechanism, and I have to remember to use it each time I create or copy or pass a reference to A.
Or... I can use a language that implements the reference counting stuff for me and implicitly calls it when I allocate new objects, create, copy, or pass references, and expire them as they go out of scope, without me having to write explicit destructors.
Basically, if you do any sort of remotely complicated object allocation where you are going to need to implement reference counting to keep track of them, you might as well use a garbage collector. That's what it does, it comes thoroughly debugged, and you don't have to waste time implementing and debugging your own.
So, a garbage collector language is MORE robust (assuming robust means 'more reliable').
That's not to say unmanaged code doesn't have its place, but in my experience managed code tends to get developed faster and cheaper than equivalent unmanaged code, so it only makes sense to use unmanaged code where you really need the performance or nuts&bolts control. Your typical productivity or business logic application don't. Drivers, real-time systems, etc do.
As always, use the best tool for the job. C is not always the best tool.
But that's the kind of stupid shit that's been spewing from here for the last 10 years.
PS - the look and feel of slashdot sucks
GOBACK.
The price is also that it is far less agile. Want to make a change? Make sure someone goes over it with a fine toothed comb. While that might sound appealing to the "experts" a lot of people just want to get the job done and move on to more exciting tasks.
...you have explicit allocation/deallocation, you get holes in memory. There's no way to avoid it, for the same reason that fragmentation occurs on disks. Unless the chunk you allocate is exactly the same size as the chunk last deallocated, there will be a region of memory that cannot be used.
This means that your heap will end up looking like swiss-cheese, unless you have some means of shuffling things around. Unless the programmer can absolutely guarantee that mallocs and frees only occur in such a way that no space unusable to the program's next malloc is ever left, the program will always have the potential of exhausting resources even without leaking memory.
This is why there are all kinds of malloc() substitutes for C, including several with garbage collection. If the program runs for long enough, the vanilla malloc() in most C libraries is simply not good enough.
It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
So, not only is it slow to start up, requires a lifetime of XML Hell, and bowing down to the architecture astronauts (remember kids -- it is not a good java program unless you can spot three design patterns for every 15 lines of code!), now they are going to make you pay for the remaining bits to work?
I am glad I stuck with C++.
Substitute "objects" with "memory" and "referenced" with "used", and you might actually reach the intended audience (people who aren't programmers).
Nice, now try couple of million lines of code, maintained by 50 or so developers of various levels of experience and see how many memory leaks there are then.
As the island of our knowledge grows, so does the shore of our ignorance.
The entire Java Stack has long since been opened up. The community essentially owns it now. What Oracle does with "Java" I could care less.
Anything that is worth while to build design and construct/maintain Java applications and VM's is all open source.
If they want to fork and become irrelevant that is there choice.
-Hack
Got Geometrodynamics? Awe, too hard to figure out? Too bad.
Other than cost, I'm curious as to what you are measuring.
It's not performance. Solaris 10 on a PC outperforms Linux when stressed, sometimes by huge margins. It's not a complete blow-out with modern kernels, like it was in the 2.4 days, but it's still significant -- and there are corners where it really still is a complete blow-out (like: What does fsync() do?).
It's not stability. Again, Solaris 10 is much less likely to crash or go all wonky when stressed, and AIX is similarly robust. And again there are corners here that can have large impact on reliability of applications (e.g. I recall some annoyances with direct io, although the specifics are escaping me at 3am).
It's not core features, by and large Linux lags the commercial UNIXen in that arena (e.g. Dtrace), which isn't really surprising since Linux is effectively a clone.
Having said that, there are certainly UNIXen that do not stand up so well to Linux (*cough* HP/UX *cough*), but there certainly exist UNIXen that are generally superior.
Of course, a lot depends on what you're doing with the system. If I need to push the system as hard as possible then I want Solaris if it is an option. If I am looking for general usability I find Linux preferable. The differences in the latter case are often minor (like the -c argument to "script") but taken en-masse they make for a more pleasant experience.
That's the way I see things today. I am not at all sure we won't see Linux pull into the lead over time -- it is getting better and better with age, and most UNIX systems appear to be seeing improvement stagnation. (And that may well be universal soon: What are the odds that Solaris doesn't see its R&D budget chopped under Oracle?) In summary I would generally prefer to do development on Linux, but want production on Solaris. Best of both worlds, at least today. It may be telling, though, that on my personal server systems I run Linux even when I am concerned about performance -- the ongoing administration is significantly easier it you pick the right Linux distribution, and it isn't picky about hardware like Solaris is, and the tool suite is free as in beer without any extra effort.
Except on the desktop. There MacOS is supreme IMO. All the goodness of UNIX, plus stellar UI and commercial applications. I dunno how it does in stress situations (almost nobody buys Apple servers) but it's a great desktop system.
jim frost
jimf@frostbytes.com
Solaris is a specific case of original, commercial unix which went open source a few years ago.
Back in the '90s, when Linux distributions started to get really popular, the Linux kernel and the distributions overtook many of the old commercial unices (e.g. SCO Unix, AIX, IRIX...) and effectively killed them.
Linux was cheaper (free), the user-land was more user-friendly (GNU tools, GNOME, KDE...), and truly cross-platform.
Linux's and GNU's openness and freedom was and is the key to its success. There are now millions of people around the world proficient in Linux/Unix who wouldn't have been for this very reason. There are people like me who made it all the way to being a Software Engineer simply by having a Linux system in the home to learn on.
Solaris is still ahead by a long way on high-end technical features like ZFS and is quite possibly the only commercial unix that has a future now.
I have 3 Solaris 11 UltraSPARC boxes in my house just now: a SunBlade 100 and two Ultra 80s (4 CPU).
Stick Men