Beta
×

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!

Everything About Java 8

Soulskill posted about a year and a half ago | from the building-a-new-generation-of-security-holes dept.

Java 233

New submitter reygahnci writes "I found a comprehensive summary of the developer-facing changes coming in Java 8 including: improvements to interfaces, functional interfaces, lambdas, functions, streams, parallels, date/time improvements, and more. The article includes example code with realistic examples of use as well as explaining the reasoning behind some of the choices made by the developers who are working on Java 8."

cancel ×

233 comments

Sorry! There are no comments related to the filter you selected.

The important bit (0, Insightful)

Anonymous Coward | about a year and a half ago | (#43296705)

Will it be more secure?

Re:The important bit (2)

p00kiethebear (569781) | about a year and a half ago | (#43296725)

After all the security vulnerabilities patched this year, I would think they're feeling the pressure to make sure there isn't a repeat.

Re:The important bit (4, Funny)

Anonymous Coward | about a year and a half ago | (#43298101)

After all the security vulnerabilities patched this year, I would think they're feeling the pressure to make sure there isn't a repeat.

Normally one would think that, but this is Oracle we're talking about.

Re:The important bit (5, Informative)

Anonymous Coward | about a year and a half ago | (#43296733)

This is about Java the language, not Java the browser plugin. You should know the difference by now...

Re:The important bit (3, Informative)

p00kiethebear (569781) | about a year and a half ago | (#43296827)

This is about Java the language, not Java the browser plugin. You should know the difference by now...

I've been misinformed then, I thought the security vulnerabilities in the java plugin were inherited from vulnerabilties in the way the language itself handled data. Someone mod up the guy above.

The plugin is the only place ... (0)

Anonymous Coward | about a year and a half ago | (#43297089)

you run untrusted code, so it's the only place being able to skirt the securitymanager matters.
Actually, there may be security isolation in Java EE servers, but there isn't much payoff
for sneaking around it.

Re:The important bit (0)

Anonymous Coward | about a year and a half ago | (#43297155)

The vulnerabilities are a result of bugs in the core library implementation. It's exacerbated by the fact that this core library API is (mostly) available to untrusted code which can combine and invoke it in ways not anticipated by the implementation authors. That's what causes these security vulnerabilities. Java-the-language does not have these vulnerabilities, so to speak.

Re:The important bit (5, Informative)

SpazmodeusG (1334705) | about a year and a half ago | (#43297635)

No Java itself is used in so many places. Your phone probably uses it for a start. From the cheapest old fashion Nokia candybars to the latest Android smartphones to a whole host of embedded systems around the place and various webservers. They all use Java extensively and they never have an issue with the language.

Unfortunately there's a particular Java plugin from Oracles version of the Java VM that insists on running every Java program your browser comes across. You wouldn't run a plugin that runs every compiled executable you come across would you? Well Oracles Java plugin tries to run every Java applet it comes across. That's where these security flaws you hear about come from.

So Java as a whole is having its name tainted by one particular plugin.

Re:The important bit (4, Insightful)

MightyYar (622222) | about a year and a half ago | (#43298287)

You wouldn't run a plugin that runs every compiled executable you come across would you?

Sadly, I have Flash installed. I think its track record is almost as awesome.

Re:The important bit (2, Informative)

lgw (121541) | about a year and a half ago | (#43298475)

No, the vulnerabilities are in Java, not the plug-in. (In Oracles JVM, the Android JVM will have its own, disjoint set of vulnerabilities).

It's just most places Java runs don't have an exposed surface to attack. Server-side Java has had tons of vulnerabilities patched so far - but it was rarely urgent to apply the patches, since there's no access to that JVM from off the box.

The browser plug-in was the way the JVM flaws were eposed, but it was the JVM that had the flaws (OK, the plug-in also has its own set of flaws, as well, but not so many).

Re:The important bit (0)

Anonymous Coward | about a year and a half ago | (#43298193)

Why anyone who knows anything about java knew that it was in the JVM and web plugins and not the language. Why does he deserve a mod point for saying the obvious?

Re:The important bit (0)

Anonymous Coward | about a year and a half ago | (#43296961)

This is about Java the language, not Java the browser plugin.

And these features need to be supported in the JVM, creating a larger attack surface. Oracle are struggling to keep what they already have secure, adding more features is just going to worsen the problem.

Re:The important bit (0)

Anonymous Coward | about a year and a half ago | (#43297073)

IBM as a great VM, (granted it's swing implementation suck)

Re:The important bit (1)

viperidaenz (2515578) | about a year and a half ago | (#43297337)

Why do you think IBM built SWT?

Re:The important bit (0)

Anonymous Coward | about a year and a half ago | (#43297431)

Why do you think IBM built SWT?

Have you ever tried to develop a rich UI using Swing? It's possible, but it seems like they went out of their way to make it difficult.

Re:The important bit (5, Insightful)

SplashMyBandit (1543257) | about a year and a half ago | (#43297571)

Actually, once you get used to Swing it is pretty hard to go back to any other toolkit. Swing is amazingly powerful, and ever since Java 1.6.0u10 also very performant (since it is based on Java2D which is DirectX accelerated on Windows and OpenGL accelerated everywhere else). One thing you do have to be aware of with Swing is not to block the "Event Dispatch Thread". Once you learn that, and how to use GrdiBagLayout properly then you are 'away laughing'.

With the Nimbus Look & Feel the look of Swing is pretty awesome. Of course, many Swing developers have or are transitioning to Swing;'s successor, JavaFX 2. JavaFX 2 looks amazing (lots of special effects, gradients, transparency, reflections, animations etc that can be switched on very easily). JavaFX 2 does have a slightly different model for properties than Swing, so there is a bit of an impedance mismatch when you embed Swing into a JavaFX 2 UI or vice versa.

I understand many don't like the learning curve of Swing, and some of the overheads (eg. TableModels) - but it turns out these abstractions are necessary for users to be able to make custom controls (which is easier, IMHO, than other toolkits as you get a lot of control on how your custom will work exactly how you want it to).

The best thing about Swing, IMHO is not even the enormous capability for extensions. For me the best features is not only to have pixel-precise layout, but also you can make the UI resize *exactly* the way you want. While I like GWT and CSV for web stuff when I use them I always miss Swing as the later us able to work out the correct size of controls itself, and resizes exactly the way I want it (that's due to a problem in browsers computing layout [which the GWT guys called "intractable" in the browser; but Swing shows this is not the case on the desktop]).

There is a lot of life left in Java desktop technologies. I'm having a great time using OpenGL (via JoGL) in Swing to produce a modern jet combat flight sim. The ability to mix Java controls and 3D saves a lot of work (most 3D apps have to implement UI controls themselves - so end up behaving non-conventionally and looking a little odd).

Re:The important bit (1)

SuperKendall (25149) | about a year and a half ago | (#43298159)

I once built a large rich UI client in Swing, once you embrace GridBagLayout it all works really well.

Swing just has a steep learning curve, and (at least at the time) kind of ugly controls. But it's very functional and not difficult once you understand the system.

Re:The important bit (1)

K. S. Kyosuke (729550) | about a year and a half ago | (#43297079)

And these features need to be supported in the JVM, creating a larger attack surface.

I'd think that deficiencies in intermediate forms can be handled. That aside, you can add as much syntactic sugar as you wish without compromising anything. (Well, the sanity of the developers, sometimes, I guess. :))

Re:The important bit (1)

viperidaenz (2515578) | about a year and a half ago | (#43297405)

And these features need to be supported in the JVM

As far as I can tell, none of these features have anything to do with the JVM. They're all library and compiler changes. None of them are directly related to security or sand-boxing. It also seems like there will be no significant changes to class verification either. Only to allow annotations in more places, maybe lambas, but I dare say they'll be implemented as regular anonymous classes by the compiler.

Re:The important bit (4, Funny)

halfEvilTech (1171369) | about a year and a half ago | (#43296967)

I say we start a pool on how many zero days will be availible by the time it launches or even if we want to be generous, within the first week.

I will start it off with 7

Re:The important bit (2)

KZigurs (638781) | about a year and a half ago | (#43297545)

Probably. Server side Java (where it is used mainly) is pretty much reasonable security wise.

Why would anyone enable Java in a browser is beyond me.

Re:The important bit (0)

Anonymous Coward | about a year and a half ago | (#43297763)

Who modded this nitwit insightful ?

Lambdas! (1)

Anonymous Coward | about a year and a half ago | (#43296711)

I can't wait!

Re:Lambdas! (0, Funny)

Anonymous Coward | about a year and a half ago | (#43296829)

I can't wait!

In December 1974, the lambda was officially declared the international symbol for gay and lesbian rights by the International Gay Rights Congress in Edinburgh, so it fits right in here with the slasdhot fanbois.

Re:Lambdas! (1)

K. S. Kyosuke (729550) | about a year and a half ago | (#43297161)

In December 1974, the lambda was officially declared the international symbol for gay and lesbian rights

Oh my, they got it wrong, Church wasn't gay, *Turing* was! They should have selected the infinite tape as their symbol!

Re:Lambdas! (1)

SuperKendall (25149) | about a year and a half ago | (#43298189)

In December 1974, the lambda was officially declared the international symbol for gay and lesbian rights

I don't care if NAMBLA or the KKK adopts the lambda as its official symbol, it's a damn useful programming construct.

it fits right in here with the slasdhot fanbois.

Projection is SUCH a painful thing to watch.

Re:Lambdas! (1)

Anonymous Coward | about a year and a half ago | (#43296927)

Lambdas were supposed to be in Java 7, it was hard, and they were cut. I expect its going to continue being hard to add lambda functions in a way that pleases all the right people and would suggest that you do in fact not wait for them.

Re:Lambdas! (0)

Anonymous Coward | about a year and a half ago | (#43298249)

Who are the "right people" ? The 5 people who bothered to learn Haskell?

Re:Lambdas! (0)

Anonymous Coward | about a year and a half ago | (#43298261)

I'm all for lambdas, closures, currying etc, but I think it was a mistake to include them in Java. The syntax is necessarily very un-Java-like and extremely cluttered with exception declarations. More importantly, Java already had closures in the form of inner classes. Ok, the syntax is still a bit cumbersome but all Java programmers have been dealing with them since day one (listeners) and are familiar with the related idioms. Lambdas don't add any new functionality or expressive power.

Nothing about security (0)

tepples (727027) | about a year and a half ago | (#43296719)

Did you Ctrl+F the linked page for "secu" too? I didn't find anything.

Java has too many versions (0, Offtopic)

Anonymous Coward | about a year and a half ago | (#43296745)

The Java language changes too much. All this meddling with the language isn't okay. It screws with compatibility, screws with VMs, screws with IT departments, etc.

And from the programmer's point of view, it requires constant education and rewriting of code with very little benefit. What was the problem with the old language?

This is all because the language is managed by a corporation. At least the standards bodies don't give us new versions more frequently than once-per-decade. (Although I don't think C needs the periodic changes it gets either.)

Also, get off of my lawn.

Re:Java has too many versions (3, Informative)

viperidaenz (2515578) | about a year and a half ago | (#43297581)

How exactly does it screw with compatibility? Old code will still compile. Old compiled classes will still load.
They're adding new stuff. Nothing old is being changed or removed.
You don't *have* to re-write anything. If someone tells you so, its because they want to.

It only screws with IT departments because they fear change. They also seem to not want to install security updates either.
The only JVM upgrade problems I've experienced in the last 10 years was with legacy code written for IBM's 1.3 JVM because the developers at the time thought it was a good idea to refer to com.ibm classes.

Re:Java has too many versions (0)

Billly Gates (198444) | about a year and a half ago | (#43297671)

How exactly does it screw with compatibility? Old code will still compile. Old compiled classes will still load.
They're adding new stuff. Nothing old is being changed or removed.
You don't *have* to re-write anything. If someone tells you so, its because they want to.

It only screws with IT departments because they fear change. They also seem to not want to install security updates either.
The only JVM upgrade problems I've experienced in the last 10 years was with legacy code written for IBM's 1.3 JVM because the developers at the time thought it was a good idea to refer to com.ibm classes.

Or we have software that needs to run? Laugh at I.T. departments all you want but we never had to worry about Vista. We never had issues with ME because we never had to run it. We didn't have to worry about the ribbon either as we gradually learned at home how to use it. We never had to worry about our browsers being broken every 6 weeks either. Sure they may not have the latest wizz bang checklist features but most sites still only develop for IE 8 anyway.

At home I use Android SDK which only runs Java 6. I plan to keep it as Java 7 had all the security issues that 6 never had because Sun wrote 6 and not Indian interns at Oracle who never touched it before.

You are right I fear change as I see Windows 8 and just reformatted my system because I had to use the headache inducing horrible gui of Office 2013 in its all white glory with no borders or colorless gray. YUCK.

Windows 7/XP and older software works fine thank you very much and I do not want to change. It is supperior and I do not have to be a guinne pig to make sales numbers for WIndows 8/0ffice 2013. MS literally called every retailer to get office 2010 off the shelves!! Assholes.

Re:Java has too many versions (-1)

Anonymous Coward | about a year and a half ago | (#43297803)

but most sites still only develop for IE 8 anyway.

Because you IT goons keep that piece of shit alive and necessary.

Re:Java has too many versions (1)

viperidaenz (2515578) | about a year and a half ago | (#43297953)

My IT department is still running Java 6 update 5 from 2008. They're too scared to upgrade to any later update levels because no one is going to give them the money to regression test every piece of Java code we've got.

The only saving grace is there is no browser plugin installed.

There has been well over 200 security issues fixed since 2008. As a bonus there has been significant performance improvements.

Re:Java has too many versions (-1)

Anonymous Coward | about a year and a half ago | (#43298121)

You need to find a new job with an IT department that doesn't suck.

Re:Java has too many versions (1)

viperidaenz (2515578) | about a year and a half ago | (#43297959)

Oh, and good luck with XP in 12 months time when there are no more security updates.

Re:Java has too many versions (0)

Anonymous Coward | about a year and a half ago | (#43298241)

The Java language changes too much. All this meddling with the language isn't okay. It screws with compatibility, screws with VMs, screws with IT departments, etc.

And from the programmer's point of view, it requires constant education and rewriting of code with very little benefit. What was the problem with the old language?

This is all because the language is managed by a corporation. At least the standards bodies don't give us new versions more frequently than once-per-decade. (Although I don't think C needs the periodic changes it gets either.)

Also, get off of my lawn.

Pretty much every single thing you said is wrong. I would like to believe this is sarcasm, but you are probably either a "java is javascript lol" idiot, or just a really shitty programmer.

Will it run Minecraft? (1)

SpaceManFlip (2720507) | about a year and a half ago | (#43296765)

THat's all that matters. How many headshots can you achieve with the diamond laser pickaxe?

Or I guess it could be considered relatively important also not to allow drive-by downloads of malicious software from webpages that you didn't even click anything on

Re:Will it run Minecraft? (1)

viperidaenz (2515578) | about a year and a half ago | (#43297599)

I don't see the risk if you don't install the browser plugin.
Java belongs on servers, not in browsers. (perhaps the occasional desktop software too)

That's pretty amazing... (-1, Troll)

benjfowler (239527) | about a year and a half ago | (#43296771)

Isn't it amazing how to the hottest stories Slashdot always appear on Hacker News 18 hours earlier?

Re:That's pretty amazing... (1)

Intrepid imaginaut (1970940) | about a year and a half ago | (#43296963)

Summaries: I like them. Even such as we get around here.

Re:That's pretty amazing... (0)

Anonymous Coward | about a year and a half ago | (#43296991)

Then i'm amazed that you still read and post on /.

Re:That's pretty amazing... (0)

Anonymous Coward | about a year and a half ago | (#43297531)

No, what's amazing is you think this is the hottest story on Slashdot.

LOL Java (0, Flamebait)

Anonymous Coward | about a year and a half ago | (#43296777)

Has it stopped being an overly-verbose, memory-hogging, slow pain the ass?

Re:LOL Java (0, Flamebait)

Lendrick (314723) | about a year and a half ago | (#43296811)

> Has it stopped being an overly-verbose, memory-hogging, slow, insecure pain the ass?

FTFY

Re:LOL Java (2)

nitehawk214 (222219) | about a year and a half ago | (#43298257)

> Has it stopped being an overly-verbose, memory-hogging, slow, insecure pain the ass?

FTFY

Sounds like you got screwed.

Re:LOL Java (3, Informative)

angel'o'sphere (80593) | about a year and a half ago | (#43297023)

For non trivial programs Java does not use more memory than an equivalent C++ program.

Same for speed. Unless you have a brain dead "repeat 1000 times" benchmark, Java is as fast as any other language.

After all: it gets compiled down to the same machine code ...

Re:LOL Java (3)

K. S. Kyosuke (729550) | about a year and a half ago | (#43297195)

For non trivial programs Java does not use more memory than an equivalent C++ program.

Only if the large majority of your data is in non-object arrays, or in very large objects so that the headers and overhead are small enough.

Re:LOL Java (1, Informative)

Anonymous Coward | about a year and a half ago | (#43297235)

After all: it gets compiled down to the same machine code ...

No, it doesn't. C++ gets compiled into machine code. Java gets compiled into bytecode that is run on the Java Virtual Machine. Also Java uses garbage collection, which can slow things down.

Re:LOL Java (2)

K. S. Kyosuke (729550) | about a year and a half ago | (#43298047)

First, the compiler algorithms are virtually identical in both cases, save for the expansion of method calls (vtables vs. multiple types of inline caches). Second, GC hardly affects overall speed if it's good enough (Azul Zing). The problem with Java's memory model is more about the lack of developer-controlled locality - if everything is an object accessed by reference, you end up with a lot of tiny pieces scattered around your memory. There's both size and speed overhead to that, no matter whether the whole thing got malloc()ed or allocated by a bump-a-pointer allocator with GC.

Re:LOL Java (2)

lorinc (2470890) | about a year and a half ago | (#43297261)

Same for speed. Unless you have a brain dead "repeat 1000 times" benchmark, Java is as fast as any other language.

After all: it gets compiled down to the same machine code ...

Not exactly. Java is unable to vectorize floating point operations now (might change with java8 though), which is very common in any multimedia application. So it remains a lot slower than what you get by default in C/C++ with a decent compiler.

Re:LOL Java (2)

viperidaenz (2515578) | about a year and a half ago | (#43297737)

C++ is unable to perform comprehensive escape analysis (good for optimising multi-threaded code). C++ also lacks the ability to optimise virtual method calls.
Java can inline non-final methods and undo it if required.

There is a *lot* of stuff you can do when you have runtime optimisations as well as compile time.

You're technically correct in the Java is not compiled to machine code. The JVM does the bytecode to machine code compilation.

Re:LOL Java (1)

K. S. Kyosuke (729550) | about a year and a half ago | (#43298087)

You're technically correct in the Java is not compiled to machine code. The JVM does the bytecode to machine code compilation.

That's like saying that it wasn't me who wrote this sentence, but instead I caused my fingers to move with the power of my will and my fingers wrote it instead. Java *is* compiled to native code. The last time I checked, the present simple tense was used for statements with general validity, and the general truth is that the majority of installed Java runtimes on PCs run the majority of opcodes executed *after* compiling them to native code. I don't see how you can make a more general statement than that.

Re:LOL Java (1)

tepples (727027) | about a year and a half ago | (#43297321)

Java does not use more memory than an equivalent C++ program.

In an exclusively garbage-collected language with no deterministic finalization, it isn't possible to do something like C++ RAII, where non-memory resources are closed as soon as an object is destroyed, in Java.

After all: it gets compiled down to the same machine code

But you still have to keep the bytecode and the VM in memory at all times, which hurts especially on a mobile device.

Re:LOL Java (1)

c0lo (1497653) | about a year and a half ago | (#43297521)

it isn't possible to do something like C++ RAII, where non-memory resources are closed as soon as an object is destroyed,

Like allocating and deallocating the c_buff buffer each time a "std:string" gets created on the stack? And you think this is fast?

After all: it gets compiled down to the same machine code

But you still have to keep the bytecode and the VM in memory at all times, which hurts especially on a mobile device.

I doubt that APK (that is: an Android Package, not the hosts-file dead-horse) requires more than one JIT compilation (which is cached afterwards) and the GC in memory.

Re:LOL Java (0)

Anonymous Coward | about a year and a half ago | (#43297851)

What? I count 4 instructions for std::string on the stack.

=> 0x0000000000402a20 : mov 0x2c3459(%rip),%rax # 0x6c5e80
      0x0000000000402a27 : add $0x18,%rax
      0x0000000000402a2b : mov %rax,(%rdi)
      0x0000000000402a2e : retq

Re:LOL Java (1)

c0lo (1497653) | about a year and a half ago | (#43298299)

try something like
{
std::string aux="Dummy message: ";
aux=aux+" hello buddy"; // would be better a "computed value" here, based on an outer cycle index
std::cout << aux.c_str() << std::endln;
}

and see how RAII goes.

Re:LOL Java (2)

viperidaenz (2515578) | about a year and a half ago | (#43297805)

You don't need to wait till an object is garbage collected for non-memory resources to be closed. You call the close method (in a finally block, or use the try-with-resources introduced in Java 7)
The C++ compiler doesn't manage resources entirely for you. You need to do that yourself in your destructor.

If keeping bytecode in memory was really a deal breaker, there is nothing stopping the use of memory mapped files.

Destructor once and only once (1)

tepples (727027) | about a year and a half ago | (#43298093)

The C++ compiler doesn't manage resources entirely for you. You need to do that yourself in your destructor.

The destructor needs to be written once and only once [c2.com] , and for an object not created with new, the destructor automatically gets called once the object falls out of scope. In Java, you have to remember to finally { something.close() } or to try-with-resource every single time. Python is somewhere in the middle on this: because CPython's garbage collection uses reference counting, destructors get called automatically for anything that isn't held by a cyclic data structure, but Python also has with that acts somewhat like Java 7's try-with-resource.

Re:LOL Java (1)

K. S. Kyosuke (729550) | about a year and a half ago | (#43298131)

In an exclusively garbage-collected language with no deterministic finalization, it isn't possible to do something like C++ RAII, where non-memory resources are closed as soon as an object is destroyed, in Java.

If only we had something like dynamic-wind to deallocate resource we don't need anymore in GC'd languages... Oh, wait, we do!

Re:LOL Java (1)

HarrySquatter (1698416) | about a year and a half ago | (#43297361)

Same for speed. Unless you have a brain dead "repeat 1000 times" benchmark, Java is as fast as any other language.

That's funny since those contrived benchmarks are the only ones Java can actually win. Usually because the C++ code is also set to no optimizations. If this were really true why are all the high-performance multimedia, mathematics, etc. libraries all still written in C, C++ or Fortran? That's because Java is still magnitudes slower.

Re:LOL Java (4, Interesting)

SplashMyBandit (1543257) | about a year and a half ago | (#43297795)

That's because Java is still magnitudes slower.

I'm afraid I have to disagree. I'm writing a modern jet combat simulator in Java and the runtime speed is fine. The bottleneck is never the CPU, it is always the GPU. I also have to say that Java's performance in terms of latency is very good. The reason for this is because I'm able to create a lot of threads very easily and Java manages resource sharing very well, plus use of the language features for synchronization threads and I get to use around 20% of each of the eight cores on my machine. When I use an excellent product in a similar niche called DCS:World I do notice that it's speed is somewhat hampered by the C++ running on a single core. Now yes, multi-threading in C++ is of course possible, but it is much tricker than Java, especially the resource management.

So I think your comment is not correct. Java is comparable to C++ (sometimes faster, sometimes slower) on a single thread. When it comes to overall performance I find Java is faster overall because it is much easier to utilize all the cores in a machine with Java. In terms of gaming the performance of programming language used is nearly irrelevant - it is all down to how well you use the GPU (especially GPU memory; if you can keep stuff in VRAM then your performance is awesome).

Finally, let's move from the speed that is not that relevant (runtime) to the speed that actually matters (development time). Java is much much faster to develop in. You do have to spend some time profiling and tuning a Java program, but since you spend far far less time debugging than C++ you are still winning. I also love the JVisualVM that comes with the Sun/Oracle JDK and OpenJDK. While C++ has profilers they are a hassle to use, you have to compile your program each time you want to profile and recompile to measure different metrics. With JVisualVM you can profile any Java program without source and without recompilation since the monitors are built into the JVM (in exactly the same way as performance counters are built into operating systems these days, accessible by dtrace, strace, truss etc).

So, I think C++ is best used in niche programs where the host environment measures its memory in kilobytes. For other applications Java is more than fast enough on a single thread, has better throughput on multi-core machines, and is *much* faster to develop in (saves money, and also means something gets delivered sooner, as in, "faster time to market"). That's why Java kicks ass on the Tiobe Index - even if users only know about it from Minecraft and browser plugin issues.

Re:LOL Java (0)

Lawrence_Bird (67278) | about a year and a half ago | (#43298145)

I think Linus would agree, C++ is best used nowhere.

Java, is that still around? (-1, Troll)

markhahn (122033) | about a year and a half ago | (#43296837)

I suppose someone still makes buggy whips, so why not Java version N+1? at least some fraction of this shrinking niche will fail to recognize that programming "investment" is a sunk cost...

Re:Java, is that still around? (2, Informative)

Anonymous Coward | about a year and a half ago | (#43297029)

Get your head our of your ass. Java is one of the most widely used programming languages. Just because you don't notice it on your desktop doesn't mean it isn't used.

Re:Java, is that still around? (1)

disambiguated (1147551) | about a year and a half ago | (#43297355)

I don't (and wouldn't) have a JVM installed so that probably explains why I don't notice it on my desktop. It used to be useful on the server side, but every month that goes by it falls further behind. Java 8 is not going to be significant enough to change that. At this point, the only reason to use Java is because that's what you've always used.

Re:Java, is that still around? (0)

Anonymous Coward | about a year and a half ago | (#43297811)

Falls further behind what server side?

Re:Java, is that still around? (1)

Anonymous Coward | about a year and a half ago | (#43298349)

I don't (and wouldn't) have a JVM installed so that probably explains why I don't notice it on my desktop. It used to be useful on the server side, but every month that goes by it falls further behind. Java 8 is not going to be significant enough to change that. At this point, the only reason to use Java is because that's what you've always used.

What do you think has replaced Java on the server side? I would love to start using it!

How does this get mod'd up? (1)

clay_shooter (1680300) | about a year and a half ago | (#43297247)

Are there that many people that don't know the difference between the browser plugin and enterprise / portable services / apps?

Its shrinking the say way as say the browser Silverlight plugin, the Adobe Flash plugin or the abomination called "Active X"

Re:Java, is that still around? (0)

Anonymous Coward | about a year and a half ago | (#43297329)

Judges: 2.3

Jane: Ouch Ted, markhahn's got to be feeling that one!
Ted: He sure is Jane. The judges have been placing much more emphasis on subtle trolling this year.
Jane: The feigned ignorance of Java's popularity is certainly a good bait for trolling the Java fanboys, but it also makes him look out of touch with the industry.
Ted: I agree. This troll may have scored higher on another Slashdot article, but trying it on an article about Java is just too obvious.
Jane: He may still get his bonus points if anybody responds.
Ted: I'm not sure Jane. I can't see even the dumbest Java fanboy sinking to this one.
Jane: Well, Java is popular, and 50% of them have less than average intelligence for a Java user.
Ted: Good luck to markhahn in the response-bonus round then!

Re:Java, is that still around? (0)

Anonymous Coward | about a year and a half ago | (#43297437)

Just another asshole talking shit.

New Features of Java 8 Summarized (5, Funny)

PhamNguyen (2695929) | about a year and a half ago | (#43296849)

Highlights of Java 8 include

Green solutions. Advanced power management features, and automatic tracking of each thread's carbon footprint. An console allows users to see the carbon footprint of each thread in real time.

Social networking. Users can share jar files on social networks, and like their friends jar files.

Cloud computing. Java 8 will be the first VM built for the cloud.

Re:New Features of Java 8 Summarized (0)

Anonymous Coward | about a year and a half ago | (#43297017)

Please tell me this is a joke?

Re:New Features of Java 8 Summarized (0)

Anonymous Coward | about a year and a half ago | (#43297315)

Please tell me this is a joke?

Darn it! Now I have to go read the article! I seriously hope this is not true. LMAO!

Re:New Features of Java 8 Summarized (0)

Anonymous Coward | about a year and a half ago | (#43297237)

Can we stuff 'friends' in a jar?

Re:New Features of Java 8 Summarized (1)

CptNerd (455084) | about a year and a half ago | (#43297331)

Most of my friends spend their time pickled, so why not?

Re:New Features of Java 8 Summarized (4, Funny)

KZigurs (638781) | about a year and a half ago | (#43297573)

You forgot Big Data. Java 8 is built to support Big Data!

So... (-1, Flamebait)

Anonymous Coward | about a year and a half ago | (#43297133)

...is it as good as C# yet?

Re:So... (0)

Anonymous Coward | about a year and a half ago | (#43297535)

Whoops, some Java fanboi negged me, bwahahaha

Re:So... (1)

Dahamma (304068) | about a year and a half ago | (#43298095)

Yeah, it's basically true... most of the major feature additions in the last couple releases really do seem to be to catch up to C# (and other, more dynamic scripting languages). C# as a language is great - it's major problem is being so tightly associated with .NET/Sliverlight/etc.

At least Java has one thing going for it - a highly responsive owner/maintainer that listens carefully to all complaints and patches security vulnerabilities almost instantly!

Re:So... (5, Insightful)

SplashMyBandit (1543257) | about a year and a half ago | (#43298309)

Java has one feature that C# doesn't. This one feature makes up for all the nice-to-have little C# features. That one feature is "portability", not only of the language, but even more importantly, *all* the standard libraries. Mono goes some way to alleviating this but there are some significant libraries that Mono haven't developed and also state (according to their own pages) that they will never develop. I don't know if you have noticed it yet, but the Microsoft is just one platform in the World - and the number of platforms is burgeoning. Apart from a few platforms Java is locked out of deliberately (iOS, Xbox) Java runs pretty much whereever you need to be - with very very little porting necessary (eg. through judicious use of libraries, like JoGL,JOAL, JInput a jet combat simulator I'm developing runs not only with unmodified source on Windows+Mac+Linux+[and some tweaks for Android]; but actually runs without needing a recompile ! [I know it is not true for everyone, but for me, "Write Once, Run Anywhere" really works - even for a very complex multithreaded OpenGL/GLSL real-time application]).

I hope that sheds some light on why some of the Java devs still use it. The nice features of C# don't necessarily make up for Java's awesome portability of *all* its libraries.

Improvements to interfaces? (0)

Anonymous Coward | about a year and a half ago | (#43297221)

I thought it was already the best write once run anywhere programming language in the world. At least that's what all the cool kids tell me. What could be left to improve?

Re:Improvements to interfaces? (0)

Anonymous Coward | about a year and a half ago | (#43297493)

ICWUTUDIDTHAR!

Kind of like how Flash is the best thing to ever hit the RIA world.

lol

Java 8 ? Already ? Seriously ? (1)

Kittown (1195605) | about a year and a half ago | (#43297425)

In the next few years we will probably run a little experiment of moving from sun java 6 to oracle java 7. Perhaps the attempt will fail at first and we will postpone the upgrade for another year or so, and then try again. But Java 8 ? Let me call you back in 5 years... or maybe 7.

Changes (3, Interesting)

phantomfive (622387) | about a year and a half ago | (#43297445)

There is a real, major benefit of using Java over other languages, such as C or Haskell or Smalltalk, which is this: it lets you work with other mediocre programmers, and has limitations that prevents them from doing anything too crazy. That is, even if they write horrible code, it won't be so bad that you can't work with it (I'm sorry fellow Java programmers if that offends you, but think of where Java is used most).

That said, I'm somewhat concerned about some of these changes. Lambda functions are great, but one of the benefits of functional programming is the lack of side effects. Under the Java 8 design, lambda functions allow you to modify member variables, which means that benefit is completely gone. This means lousy programmers will be able to write incredibly complex code, with strange side effects, that is hard to use.

The new streams functionality is fine, but did they really have to call it streams? When there are already Streams in Java?

String.join() is great. Finally.

The new Date library looks fine. It better be good enough, because do you really want yet another Date system added into Java?

Re:Changes (1)

the eric conspiracy (20178) | about a year and a half ago | (#43297465)

Most decent Java programmers have been using Joda for years. This is just bringing in something that is standard practice.

Re:Changes (1)

KZigurs (638781) | about a year and a half ago | (#43297595)

Uhm. I think I'm a decent Java programmer and I haven't bothered to use Joda ever. Not every problem involves handling dates.

Re:Changes (2, Insightful)

Anonymous Coward | about a year and a half ago | (#43297979)

Lambda functions are great, but one of the benefits of functional programming is the lack of side effects

What people want is to pass a callback to something and then play with members from within the callback, and do so --> WITHOUT <--- having to create a single use method with some pathetic name in some other place inside the class. Your supposed 'benefit' is exactly the opposite of the intent. ECMAScript 6 specifies 'fat arrow' functions for the same reason; lambda's that easily expose the outer context to the body of the lambda so we can all stop doing var that = this.

Lambdas are perfectly legitimate beyond pure functional languages. They allow more concise, lexically meaningful code and reduce namespace pollution.

Re:Changes (2)

devent (1627873) | about a year and a half ago | (#43298125)

This is what I like in Java in comparison to other languages: the language moves slow, the JDK moves slow, but you have for everything open source libraries and tools. Unlike C or C++ I can mix those libraries without any hindrance, because the basic types are fixed in the Java language: String, primitives, etc.

Call me old-fashion, but I like that the language is evolving slow. In Java I can use Groovy, Scala, Python, Ruby, JavaScript, etc. if I want "modern" features, like closures, lambdas, etc. Plus I have like 391,000 open source libraries* to enhance Java. I have enterprise ready tools and IDEs, all free.

Will I benefit from Java 8 features? Maybe. Is it important: No, not at all. Oracle could have Java 6 for another 10 years. The core language is fine.

My wish list would be: more polish for Swing, new widgets in Swing, faster JVM, smaller JVM, better modularization support (like OSGi). I wish Oracle would offer an official GTK+ theme for Swing, and Oxygen theme for Swing on KDE.

[*] http://mvnrepository.com/ [mvnrepository.com]

Re:Changes (1)

phantomfive (622387) | about a year and a half ago | (#43298347)

My wish list would be: more polish for Swing, new widgets in Swing, faster JVM, smaller JVM,

Yeah, now those are some real changes that would be more practical.

Functional Interfaces (0)

Anonymous Coward | about a year and a half ago | (#43297463)

If things like Kawa Scheme and Scala already run on Java, what advantages is there for functional interfaces? Will these projects be able to benefit from these advances? In what way?

You can Pry Java 6 off my cold dead fingers (0)

Billly Gates (198444) | about a year and a half ago | (#43297623)

Finally a version that is not loaded with security issues relatively and can run all the software out there. Java 7 was truly terrible and has too many updates. There is no time for that at work.

Java 7 had 50 patches in just one month!

Java 6 does not have nearly the amount of vulnurabilities and is right up there with XP. It works and is mature and I do not see a reason to change.

I wonder what it will break next?

Re:You can Pry Java 6 off my cold dead fingers (0)

Anonymous Coward | about a year and a half ago | (#43297813)

To quote the cockroach alien in Men In Black: "Your offer is acceptable."

(Hint: They've already stopped supporting Java 6, and you can bet there are unpatched 0-day exploits left in it, so your options are: (a) buy a $multimillion contract, or (b) uninstall Java 6 immediately.)

wrong - still supported and patched (2)

rubycodez (864176) | about a year and a half ago | (#43298407)

Java 1.6 is the engine for java ee servers such as IBM websphere and tc server. there are still patches for 1.6 coming out, we just installed some at work recently for both the IBM and "Sun" (oracle) jdk

in fact, java 7 is optional add-on for websphree 8.5

Change versioning please (0)

Anonymous Coward | about a year and a half ago | (#43297711)

If I'm running Java 8, I'd like the version number to actually be 8 instead of 1.8 please. It really confuses people to this day.

Why continue with Java (1)

Lawrence_Bird (67278) | about a year and a half ago | (#43297861)

as all it seems to be doing now is playing catchup to something like Scala which has at least thought out the functional stuff maybe a bit more

Could Project Lambda be axed? (2)

jphamlore (1996436) | about a year and a half ago | (#43298289)

Project Lambda from what I have gleaned has as its goal not necessarily feature parity with other programming languages, but instead speeding up certain multicore computations. It is therefore an experiment, and as its coding is not done yet, no one can be sure whether the experiment will be a success. What if the speed-ups simply don't happen once the implementation is finished? Given that Project Lambda may already be delaying some of Java 8, even though it was supposed to be the focus of Java 8, why couldn't Project Lambda be dropped if the experiment fails? There already seem to be so many compromises with the syntax compared to other languages that usage of Project Lambda may not be intended for general programming. Face it, the time to put in the equivalent of Project Lambda was near the dawn of Java, not trying to retrofit it at such a late stage. Perhaps it would be better to shelve it indefinitely as the community never had its heart in the concept.

Java needs explicit operator overloading (2)

mark-t (151149) | about a year and a half ago | (#43298385)

Ever since autoboxing was added, it's already implicitly overloading operators for all of the object wrappers around atomic types anyways, and it's always implicitly overloaded the + operator for the String object, so the objection that it adds complexity should not be an issue. The only real remaining objection about unreadability that always seems to arise when the subject of operator overloading on user-defined classes is raised is actually entirely isomorphic to complaints about function or variable naming practices where the identifer's name doesn't effectively convey any sense of what the identifier's real purpose is... Java doesn't stop a programmer from using global class name like qxj, for instance, so it makes no sense to prohibit operator overloading merely on the suggestion that the resulting program is harder to read or maintain (and even then, such an identifier may even have a legitimate purpose in certain contexts.... but then, so can operator overloading, which is my point)

imprecise Dates would have been nice (1)

DulcetTone (601692) | about a year and a half ago | (#43298503)

I'd like to see a Date that can be missing some fields, such as "early january", or "2013" and have the objects be Comparable and yet not forget that their actual value is not exact. For instance, "early" in a month might mean the 5th in terms of comparison, but its toString() would say "early January", and a year without further specification might compare as June 30th.

These sorts of things are helpful when you're recording researched data and don't want the persnickety exactness of the representation to hide the fact that you don't know all the fields.

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?

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>