Friday, July 29, 2011

Eclipse support for Java7

Good news for Eclipse users is that all new builds of Eclipse 3.7.1, 3.8 and 4.2 will now fully support Java 7.
Earlier development of Java7 support in Eclipse was being done in BETA_JAVA7 branch which now has been fully merged into the HEAD and the R3_7_maintenance branch.


So the implication is that if you want Java7 support, you need to move to the latest builds of Eclipse Indigo (3.7.x) or higher. Cannot use Eclipse Helios (3.6.x) or even the initial versions of Indigo as the older JDT & Core packages do not understand the new Java7 features as Eclipse uses its own compiler and the ones built into older versions of Eclipse do not support Java 7. Also, as noted in the Project Plan For Eclipse Project, version Helios, support for Java 7 is deferred and decoupled from the 3.6 release since Java 7 release will be after the official release of 3.7.

Note that you will need to download a 3.7 maintenance build (>= M20110729-1400), a 3.8 build (>= I20110729-1200), a 4.1 maintenance build (coming soon) or a recent 4.2 build (>= I20110729-0200) to get Java7 support in Eclipse.

Java 7 GA release finally available

Java 7 was finally release into the wild today and made "GA" - Generally Available!
Download the latest from here.
Here's a very high level list of the new features/changes that made into Java7:

VM
  • Support for dynamically-typed languages using the new InvokeDynamic instructions
  • Strict class-file checking

Language
  • Small language enhancements from Project Coin like Strings in switch statements, try-with-resources statements, diamond operator, etc.

Core
  • Upgrade class-loader architecture to avoid deadlocks in non-hierarchical class-loader topologies
  • Concurrency and collections updates in form of a lightweight fork/join framework, flexible and reusable synchronization barriers, transfer queues, concurrent linked double-ended queues, and thread-local pseudo-random number generators

Internationalization
  • Support for Unicode 6.0
  • Separate handling of locales to separate formatting locales from user-interface language locales

I/O & Networking
  • New APIs for filesystem access, scalable asynchronous I/O operations, etc
  • New NIO.2 filesystem provider for zip and jar files
  • API for the Stream Control Transmission Protocol (SCTP) on Solaris
  • SDP (Sockets Direct Protocol) support for reliable, high-performance network streams over Infiniband connections on Solaris and Linux
  • Networking code modified to use the Windows Vista IPv6 stack, when available, in preference to the legacy Windows stack
  • Support for Transport Layer Security version 1.2

Security & Cryptograpphy
  • Implementation of the standard Elliptic Curve Cryptographic (ECC) algorithms to allow Java programs to support it out of the box

Database Connectivity
  • JDBC 4.1 and Rowset 1.1

Client
  • New Java2D graphics pipeline based upon the X11 XRender extension, which provides access to much of the functionality of modern GPUs
  • New platform APIs for features originally implemented in the 6u10 release namely Translucent and shaped windows, and heavyweight/lightweight component mixing
  • Cross-platform Nimbus look-and-feel for Swing
  • SwingLabs JXLayer component decorator added to the platform
  • New Gervill sound synthesizer created and made available

Web
  • Upgrade of the components of the XML stack to the most recent stable versions: JAXP 1.4, JAXB 2.2a, and JAX-WS 2.2

Management
  • Enhanced MBeans to report the recent CPU load of the whole system, the CPU load of the JVM process, and to send JMX notifications when GC events occur 

Pheww - that was a long list to say the least ;) No wonder the release date for Java7 was a very difficult moving target.
I will be putting out a detailed post on each of the features soon - so keep watching this space!

Thursday, July 21, 2011

Conditional Breakpoints in Eclipse

If you have a big data set that you are using to test changes that apply to specific scenarios or rows, Eclipse conditional breakpoints can help to make life easier and simpler.

In Debug View (obviously!), right-click on the breakpoint that you want to make conditional and in the window that opens up, check "Enabled" box and then the "Conditional" box. This enables the textarea below it where you can enter any valid java expression which should trigger this breakpoint when true.

Optionally, you can also check the "Hit count" box and enter a positive number to make this breakpoint trigger after that many number of iterations.

LinkWithin

Related Posts Plugin for WordPress, Blogger...