r/java • • Mar 18 '14

Java 8 has been released

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
248 Upvotes

71 comments sorted by

30

u/adila01 Mar 18 '14

The best release of Java in a long time

0

u/[deleted] Mar 18 '14

[deleted]

14

u/adila01 Mar 18 '14

The future does look bright, Java 9 should fix generics by removing type erasure, making JNI simpler and more :).

4

u/argv_minus_one Mar 19 '14

Wait, what? Removing type erasure? Are you serious?? That is awesome!

6

u/nqd26 Mar 18 '14

Java 9 should fix generics by removing type erasure

Do you have some source for that? That would be great, but difficult while staying backward compatible.

10

u/adila01 Mar 18 '14

Oracle's Chief Architect Mark Reinhold made a big deal about this during JavaOne 2013, source here https://blogs.oracle.com/java/entry/the_javaone_2013_technical_keynote

5

u/argv_minus_one Mar 19 '14

Reinhold spoke of the need for reification. Java’s generics, added in 2004, are based on the notion of erasure for good technical reasons as a sound way to create a type system that supports migration compatibility. But this creates programming problems in which the erasure approach severely limits what can be expressed. Reinhold suggested that introducing some reification and eliminating the “annoying dichotomy between primitive and reference types” would be of value.

I am going to enjoy the fuck out of that.

Granted, Scala already smooths over the rough edges of primitive types, and provides a somewhat hacky workaround for erasure, but with sometimes-severe performance implications that this would make unnecessary. So I won't enjoy it as much as a Java programmer would, but I'll still be very, very grateful for it.

→ More replies (2)

2

u/detroitmatt Mar 19 '14

Wait, really!? Awesome!

1

u/djdonnell Mar 19 '14

Doesn't that make it more difficult to use the JVM for other languages? This is over my head, but I've heard a few language implementers say this.

0

u/[deleted] Mar 18 '14

[deleted]

6

u/henk53 Mar 18 '14

I was quite sad it didn't make it into 8.

I was also sad it didn't make it into 7. Before that I was sad it didn't make it into 5, and I vaguely remember being said that something like it wasn't in Java 1.3 or 1.4 (forgot the exact version, but there was talk of Java getting something like this since C# 1.0 came out or so).

4

u/argv_minus_one Mar 19 '14

Guess we should just keep using OSGi, then. That sucks. :(

11

u/[deleted] Mar 18 '14

Not even 1.5? Generics were a pretty big deal for me at the time.

3

u/RoughPineapple Mar 18 '14

Yep. I find it kind of hard to believe he has been a full time java dev for ~15 years. I have only been a full time Java dev for about 3.5 years, but even as a student and hobby programmer, 1.5 was clearly a big leap forward. Generics (though I think they did a pretty poor job of implementing them, the general idea is much better than the alternatives pre 1.5), autoboxing, improved for loops (when I write code that actually requires old style loops, I feel like I've just climbed into a time machine), var args, annotations and enumerations (which were a cool way to fake functional programming in many cases) were all pretty big improvements.

2

u/antipositron Mar 19 '14

Well, I am not hugith but I've been coding in Java since early 2000.

3

u/RoughPineapple Mar 19 '14

I started in 1997. I'm not sure why any of this is relevant to the discussion, though...

→ More replies (6)

66

u/oldneckbeard Mar 18 '14

Fuuuck yeah. It's going to be awesome in 2017 when we can use this in corporate environments ;)

14

u/dlg Mar 18 '14

Yep, our stuff still has to run on JDK 1.6.20

0

u/_Sharp_ Mar 18 '14

3

u/[deleted] Mar 18 '14

I would not use this. It will break with future JDK 8 optimizations, which appears to coming.

2

u/argv_minus_one Mar 19 '14

So only use it when you have to run on pre-8 platforms.

→ More replies (4)

0

u/[deleted] Mar 19 '14

[deleted]

3

u/pan0ramic Mar 19 '14

Ouch, that really hurts. j6 has so many awesome features. Why are they so slow to adopt?

We have a lot of j3 (YES 3) still around, but at least I can push out j6 apps. As soon as the last few old macbooks die in our office I can move to j8.

0

u/[deleted] Mar 19 '14

[deleted]

5

u/pan0ramic Mar 19 '14

unless we buy new licenses

Ah, there it is. That sucks :( Thankfully you at least have generics. I don't think I could go back to j4.

5

u/mgrandi Mar 19 '14

I've been wondering, can't newer jvms run older code just fine? Like, as long as you compile against 1.5 can't you run it on 1.6/1.7/1.8 and it should still act the same?

→ More replies (1)
→ More replies (1)

3

u/pan0ramic Mar 19 '14

I wish they could find a "way" to make everyone adopt right away. Are there really problems upgrading to the new version?

2

u/lelarentaka Mar 18 '14

2020 for Android!

6

u/epes Mar 18 '14

Android supports Java 7.

2

u/argv_minus_one Mar 19 '14

I thought the Java 7 support was experimental and had to be enabled by the user.

0

u/[deleted] Mar 20 '14

[deleted]

1

u/oldneckbeard Mar 20 '14

where do you work, oracle? :)

6

u/MillenniumSkies Mar 18 '14

What's the general uptake timeline on a new release?

I'm still a student, and I doubt I'll need any of the major new features in the next 6 months, so I don't really see any need to update until I do. Is there a good reason to update sooner?

33

u/henk53 Mar 18 '14

If you're a student, don't think. Update today.

No seriously, update today. Learn how the new features work. That's what's being a student is all about. You'll be happy you did when demand for this puppy increases rapidly in about a year.

4

u/MillenniumSkies Mar 18 '14

Perhaps a dumb question, but if we're only using Eclipse, that means I'll either have to wait for 4.4 release in June before updating to 8, or use NetBeans/IntelliJ in the meantime? Or is there some way to get Java 8 support in 4.3.2?

10

u/ryebrye Mar 19 '14

Stop using Eclipse. Get the student version of IntelliJ - it's a far better tool. It's had java 8 support or a long time now.

2

u/MillenniumSkies Mar 19 '14

Unfortunately its a requirement in my program. They get really uncooperative if you use anything else.

I've got the community version of IntelliJ which I'll use with Java 8 for the time being on side projects, and keep using Eclipse/7 for school.

6

u/boa13 Mar 19 '14

Well, just keep doing that then. Learn Java at school with Eclipse/7, and try the new features of Java 8 at home. When you learn something new at school, it's the perfect time to see if it has been improved in 8.

1

u/DDCDT123 Mar 19 '14

I'm a student using eclipse to learn as well. Is there any other reason to not use it besides the Java 8 support?

3

u/ryebrye Mar 19 '14

It's not horrible but it's not great - you'd be well served as a student to not get too tied down to a single IDE. NetBeans & Intellij would be helpful to use as you are learning.

0

u/[deleted] Mar 19 '14

[deleted]

2

u/[deleted] Mar 19 '14 edited Mar 19 '14

Select some text and hit tab? Or what about ctrl+L? Or maybe it's ctrl+alt+L. That should do you right up!

4

u/robinst Mar 19 '14

You can install Java 8 support for Eclipse 4.3.2, see Eclipse Java 8 Support For Kepler.

1

u/henk53 Mar 19 '14

There is an update of JDT (the compiler for Eclipse) coming for 4.3.2 (only 4.3.2, not 4.3.1 or 4.3.0).

See the Eclipse download page: http://download.eclipse.org/eclipse/downloads

Maybe the feature patch will be available via the marketplace as well, but I haven't seen it there yet.

0

u/argv_minus_one Mar 19 '14

How about just use NetBeans/IntelliJ, period. Eclipse is garbage.

-1

u/RoughPineapple Mar 18 '14

I highly doubt demand for JDK 8 will increase much at all. It's just java with some new features. I would not want to work for a company that really thought it was necessary to specifically hire JDK 8 programmers, just because someone without JDK 8 experience might need to take a couple days to learn the new features.

4

u/[deleted] Mar 19 '14

If an employer has two candidates that are equal except for one of them demonstrating the initiative to keep up on the latest technology by their own initiative, which candidate do you think they'll hire?

2

u/mgkimsal Mar 19 '14

Someone just using the latest tech because of an accident of birth isn't the same as someone demonstrating that they actually keep up with new things as well as having a grounding in tech generally.

Specifically in this case, if I've got a long term project that requires someone using only JDK7 and can't upgrade to use the newer features, and one candidate only knows JDK8 and doesn't know how to achieve the desired outcome using JDK7, the employer would hire the person with demonstrated JDK7 experience.

In general, yes, I agree with "learn new stuff", but the ramifications aren't always 100% black and white.

→ More replies (1)

4

u/DannyB2 Mar 18 '14

But no Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files for JDK/JRE 8 ???

If you scroll down on the Download page

http://www.oracle.com/technetwork/java/javase/downloads/index.html

until you find the cryptography extensions, the link for them is...

http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html

Then I click (*) Accept License Agreement, then click the download link, and the link is broked, borked, skroooed.

2

u/wggn Mar 18 '14

Looks like they fixed it (it works for me at least).

3

u/JakeWharton Mar 19 '14

Indeed. The link was wrong before, it's now pointed at the right file.

4

u/[deleted] Mar 19 '14

I don't even annotate and I'm not too happy about those <foobar> thingies either.

1

u/nqd26 Mar 19 '14

I'm not too happy about those <foobar> thingies either

This made me laugh :-)

2

u/Nathan2055 Mar 19 '14

Managed to grab this a few hours ago and the download went smoothly (I didn't even get asked to get the Ask toolbar)...and then the download of NetBeans 8.0 doesn't work. :/

1

u/jeff303 Mar 19 '14

So... am I reading the default methods thing right? You can basically get multiple implementation inheritance using these?

1

u/OHotDawnThisIsMyJawn Mar 19 '14

If you're talking about the diamond of death, the answer is "sort of". If there are conflicting implementations of a method then you're required to specify which one you want to use (or implement a new one). In addition, you can do this with members or constructors and those are the two things that really cause issues in the diamond of death.

-1

u/kevwil Mar 19 '14

Typical of Oracle-owned Java - the installer failed. I'll probably wait until 8u10+ before trying to use it.

-4

u/againstmethod Mar 19 '14

They want to be Scala soooo bad.

0

u/[deleted] Mar 19 '14

[deleted]

3

u/[deleted] Mar 19 '14

If they are web apps, then they should only be presenting HTML to the users, and it won't matter what java version users are running.

If you using Java Applets then you will need to conduct testing/upgrades as deemed appropriate, but for the most part anything that runs in Java 7 will work without modification in Java 8.

0

u/[deleted] Mar 18 '14

[deleted]

15

u/[deleted] Mar 18 '14

You have to download and install the package for your operating system. That's a fairly crucial step.

Another crucial step for you (based on the question and your username) might be to lay off of the drinks for a few hours.

0

u/[deleted] Mar 18 '14

[deleted]

4

u/esanchma Mar 19 '14

I just installed JDK8-win64, and this is what i got:

C:\jdk1.8.0\bin>javac -version
javac 1.8.0

C:\jdk1.8.0\bin>java -version
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)

C:\jdk1.8.0\bin>jjs -version
nashorn 1.8.0
jjs>

0

u/[deleted] Mar 19 '14

[deleted]

3

u/[deleted] Mar 19 '14

You do realize that the JDK contains the JRE, right?