Live data from Hacker News

Java 7 is now available

oracle.com

71–80 of 218 posts

Re: Java 7 is now available

#72
There is a good amount of stuff to get excited about in this release.

  - Try-with-resources-Catch-Block [0]
  - Fork/Join libraries from Doug Lea (author of Executor framework) [1]
  - Inferred/Simpler generics in declarations (should have been in Java 5)
  - NIO2, brand new/robust filesystem APIs [2]
  - NIO2, treat ZIP/JAR files like directories of files for R/W [3]
  - SDP support [4]
  - String-in-switch (NOTE: check on performance implications of this for tight loops)
    NOTE: Read through "COMPILATION" section here for details [6]
  - Elliptic curve cryptography (when normal curves just don't cut it)
  - Underscores in numbers (e.g. int million = 1_000_000;)
  - XRender pipeline on Linux (Swing/Java2D rendering get a big boost)
  - New sound synthesizer (replaces a proprietary lib that wasn't OS)
  - XML stack finally got updated across the board.
  - InvokeDynamic (already talked about numerous times below)
  - Other Swing stuff I'm not all that pumped about.
I think the most exciting items are:

  1. Try-with-resources
  2. NIO2 filesystem API
  3. InvokeDynamic
Features that got pushed to 8 (next year) that will be really exciting:

  - Modular programming (super packages? think OSGi-lite)
  - Syntactic Sugar: Collection literals
    List people = {"Frank", "Mary", "Satan"};
  - Closures
  - Modularization of the JDK (JDK gets broken into core modules)
And one that I can't get confirmation on if it's in 7 or got pushed, index-access for List and Maps [5]:

  - List people = {"Frank", "Mary", "Satan"};
    System.out.println("Hello " + people[0]);
I understand that a lot of people don't find Java sexy any more, that is understandable, it has become a platform for what seems like a lot of next-series of languages.

That being said, I've been working with Java since 1998 and still love it. I know people get a big kick out of writing code with no exception handlers and no curly braces, and programming is a creative/artistic process so you have to do what feels good... but none of that stuff ever bothered me.

I like being a pedantic programmer.

[0] http://www.javacodegeeks.com/2011/07/java-7-try-with-resourc...

[1] http://artisans-serverintellect-com.si-eioswww6.com/default....

[2] http://openjdk.java.net/projects/jdk7/features/#f250

[3] http://openjdk.java.net/projects/jdk7/features/#fa537814

[4] http://openjdk.java.net/projects/jdk7/features/#f639

[5] http://mail.openjdk.java.net/pipermail/coin-dev/2009-March/0...

[6] http://mail.openjdk.java.net/pipermail/coin-dev/2009-Februar...

Re: Java 7 is now available

#75
post #54

Looks like this version is not open source. Is there an open-source version of Java 7? Edit: Yes! http://openjdk.java.net/ has an announcement at http://mail.openjdk.java.net/pipermail/announce/2011-July/00... . So why would anybody "accept the Oracle Binary Code License Agreement for Java SE"?

> So why would anybody "accept the Oracle Binary Code License Agreement for Java SE"?

Anybody who wants Oracle commercial support:

http://www.oracle.com/technetwork/java/javase/community/open...

Oracle's Commercial Distribution of the JDK

People who want the benefits of commercial support and predictability can choose to use Oracle's commercial distribution of the Java SE JDK or JRE. Oracle's commercial JDK releases will be built from the open-source code, for the most part. Since there's some encumbered code in the JDK, Oracle will continue to use that code in commercial releases until it is replaced by fully-functional open-source alternatives. To learn more about development and deployment support options, visit the Java Support site.

Re: Java 7 is now available

#77
post #72

There is a good amount of stuff to get excited about in this release. - Try-with-resources-Catch-Block [0] - Fork/Join libraries from Doug Lea (author of Executor framework) [1] - Inferred/Simpler generics in declarations (should have been in Java 5) - NIO2, brand new/robust filesystem APIs [2] - NIO2, treat ZIP/JAR files like directories of files for R/W [3] - SDP support [4] - String-in-switch (NOTE: check on perfo…

Good, about time. If they only get those features slated for Java 8, they'll be at the same level C# was six years ago. :-)

Re: Java 7 is now available

#79
post #51

Earlier quoted context omitted.

God, I seriously hope string-switching doesn't catch on. In a prev job, I saw this block of code - ------- public int getDaysInMonth( String month ) { if( month.equalsIgnoreCase("january")) return 31; else if( month.equalsIgnoreCase("february")) return 28; else if( month.equalsIgnoreCase("march")) return 31; else if( month.equalsIgnoreCase("april")) return 30; ... } ------- My eyes bled. I said folks, just map the mo…

I have to admit - I never even thought that there would be an easier math-formula way to calculate it. Though I would have written the switch: case "september": case "april": case "june": case "november": return 30; It's sad, but still need to go through the poem in my head to remember most of the time.

Use the knuckles trick: http://lifehacker.com/232828/macgyver-tip-use-your-knuckles-...

Re: Java 7 is now available

#80
post #55

Earlier quoted context omitted.

I don't know if I agree. The Java language has floundered (I've been stuck coding in it for the last couple of years), but I think the platform/JVM has started becoming used more and more often for new + exciting language options. The new release should make implementing dynamic languages on top of the JVM easiser, and could open the doors for a lot of interesting options.

I don't think I would say it's floundered. I came back to Java last year after 10 years of C++, and was really pleasantly surprised: Programming in Java now is a nice experience. I would say it has matured, not floundered.

I think it depends on the time frame you look at. I started in Java back w/ some of the pre 1.0 releases. Between then and now, it's come a really long way.

Maybe I'm biased due to other new(er) languages becoming mainstream. But it feels like Java (as a language) has fallen behind as other Languages adopt new features that cater to different/modern techniques.

Java won't ever be cutting edge (and given the types of applications that are built with it, some stability/maturity makes a lot of sense), but look at the advances that C# has made since 1.5/1.6 has been out.

It wasn't like C++ pre C+11 -it didn't take a decade or soto catch up with the rest of the programming world, but you can see the its size slowing its advancement down.

I want to like programming in Java again (I'm not saying it's bad, or it's a mistake) - for a long time it was my go-to language for when I play with ideas. But for now it's just a way to pay the bills while I try to figure out what I want to do/make/build.

Post reply on HN