Showing posts with label jdk7. Show all posts
Showing posts with label jdk7. Show all posts

Saturday, 28 April 2012

The JVM finally moving forward

After almost a year of delay, Java 7 has been officially released for the Mac. SeeJava 7 Mac OS X download and README.
In order to use it in Eclipse and others, bear in mind that the PATH is now:
/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents
This may be inaccesible to Eclipse, but you can paste the whole line, or create a symlink. It contains the sources, but no Javadocs.
This is a huge milestone, which marks the beginning of the end for Java 6, which was released 6 years ago. Technologies like Scala have soared since. But now with JDK 7 been readily available in all platforms, and with many bugfixes since the original release, it's time to upgrade. Last step will be JDK7u6 when the JRE will be fully availabe. See my previous post on Java 7, 8 and beyond
Update: After running a couple of scripts, I ran into this issue with UnknownHostException in JDK7
See this snippet:

This is my /etc/hosts
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
192.168.1.3 loki

Sunday, 6 June 2010

Comparing functional programming with JDK7 Lambdas and Scala

It seems that since Oracle bought Sun, they want to start breathing new life into Java. Out of the blue, Project Lambda seems to be pushing the spec for what would end up been functional idioms for Java.

The debate that the new syntax brings is captured in this InfoQ article on project Lambda.

compare Java 7's:


with Scala's




for my part, i prefer Scala's functional syntax, since I have a first class function that i can invoke. Brian Goetz (Concurrency guru) suggests that at the moment they are focusing in functionality rather than syntax, and that it will evolve.

Now, they better work a lot in order to improve this spaghetti:



For a move in depth review of the changes proposed, read this analysis on Project Lambda in InfoQ

The interesting point to make out of this is that Functional Programming is becoming more and more important and Java doesn't want to miss out. A few months ago, JDK7 was leaving closures out of the spec in order to ship a highly demanded final version. But now Oracle is in command, and they want to include FP in Java. This means that effectively Functional Programming is now becoming mainstream, supported in almost every major platform: F# in .Net, Scala, python, javascript, groovy, and now Java.