Oracle Announces NetBeans IDE 7.0 with Support for JDK 7 Developer Preview


Published April 2011

This article provides an overview of many of the new and improved features in NetBeans IDE 7.0.

Downloads:
Download: NetBeans IDE 7.0

Allowing users to take advantage of latest developments in Java Platform, Standard Edition (Java SE), NetBeans IDE 7.0 introduces language support for development to the upcoming JDK 7 release, currently available as a Developer Preview. Additional enhancements include new support for GlassFish Server Open Source Edition 3.1 and Oracle GlassFish Server 3.1 and full integration of Oracle WebLogic Server. New support for Oracle Database is included, as well as Apache Maven 3 and HTML5 editing support, and enhancements to the Java editor. In addition, an improved and far more intuitive GridBagLayout visual designer has been integrated for Swing GUI development.

Contents
About the NetBeans IDE
About JDK 7
NetBeans 7.0 Supports JDK 7 Developers
New Server Features with Enhanced GlassFish Server and Oracle WebLogic Server Support
New Database Wizard, Maven 3 Support, HTML5 Integration, and More
See Also

About the NetBeans IDE

NetBeans 7.0 is not only an IDE, it’s a "Productive Development Environment" (PDE).
With NetBeans 7.0 there is literally no barrier to enter Enterprise Java, Rich Client Platform (RCP),
or Java 7 features. Everything you need is already included. It’s download – develop – deploy.

Adam Bien, Independent Java Consultant

The NetBeans IDE is an award-winning integrated development environment available for Microsoft Windows, Apple Mac OS, Linux, and Oracle Solaris. The NetBeans project consists of an open-source IDE and an application platform that enable developers to rapidly create Web, enterprise, desktop, and mobile applications using the Java platform, as well as PHP, JavaScript and Ajax, Groovy and Grails, and C/C++.

The NetBeans project is supported by a vibrant developer community and offers extensive documentation and training resources as well as a diverse selection of third-party plug-ins.

 
About JDK 7

JDK 7 is a principle product, along with Java SE Runtime Environment (JRE), in the next major release of the Java Platform, Standard Edition (Java SE) 7 platform. Proposed features include many improvements to the Java language and improved performance. The proposed Java SE 7 platform supports all Project Coin language enhancements, such as binary literals, underscores in numeric literals, strings in switch statements, the try-with-resources statement, and more. JDK 7 is currently available as a Developer Preview--a release that is feature-complete, stable, and ready for testing.

 
NetBeans IDE 7.0 Supports JDK 7 Developers

By working with the Project Coin team over several years, NetBeans 7.0 supports
all the Coin features. NetBeans-derived technologies were also used to
help update the JDK 7 libraries to use the new Coin features.

Joe Darcy, Project Coin Lead, Oracle Corporation


NetBeans IDE 7.0 developers can immediately start leveraging JDK 7 Developer Preview to code projects. New proposed language features from Project Coin/JSR 334, including diamond support, try-with-resources statements, and strings in switch statements, are supported in NetBeans IDE 7.0. Other platform upgrades in internationalization, security, and object utilities are also fully supported in NetBeans IDE 7.0.

Selecting JDK 7 as the target platform in the NetBeans 7.0 platform manager enables advanced features in the IDE. The IDE recognizes coding constructs, offers correct classes for code completion, correctly highlights errors, and provides hints. It further suggests better coding for JDK 7 and helps developers by offering to make code replacements.

Some of the new features supporting the proposed JDK 7 include:

  • Editor enhancements – NetBeans IDE 7.0 helps developers build JDK 7-compliant code. The editor provides hints to help developers take advantage of JDK 7. Users can simply click a hint and select the suggested action to replace selected code with optimized JDK 7-compliant code.
  • Strings in switch – switch was required to be one of the primitive data types: byte, short, char, int, or enum. Now with JDK 7, the String data type is added. NetBeans IDE 7.0 will recognize when if-then-else statements are used instead of switch statements and offer to convert them to the switch statement.
  • Diamond support – The new diamond syntax allows for more compact and readable code by saving repeated type arguments.For example, programmers can now write
    List<String> = new LinkedList<>(); and the NetBeans IDE will infer that a new linked list of strings is being created.
  • Support for try-with-resources – 7.0 can automatically convert code to use the new try-with-resources. This statement helps correctly and robustly manage resources that otherwise need to be explicitly closed.
  • Multicatch variable declaration support – Code completion is supported for the multicatch variable declaration. Hints to join multiple catches into one multicatch are provided if the handling code is the same.
  • New integer literals support – JDK 7 supports binary integer literals in addition to octal, decimal, and hexadecimal literals. NetBeans IDE 7.0 allows literals to be easily converted from one base to another.

NetBeans 7.0 supports all features outlined in Project Coin.

New Server Features with Enhanced GlassFish Server and Oracle WebLogic Server Support

Developers will find a new and enhanced server run-time node in NetBeans IDE 7.0. In addition to existing support for Apache Tomcat and Red Hat JBoss, support is now provided for GlassFish Server 3.1 and Oracle WebLogic Server. New application server features in NetBeans IDE 7.0 include:

  • Support for GlassFish Server 3.1 – Developers can now register GlassFish Server 3.1 instances. A new feature allows users to restart a remote instance of the GlassFish Server. The instance can also be restarted in debug mode even if it wasn’t initially started in this mode, thus bypassing the need to log in to the server. Users can also view the log file for remote GlassFish Server 3.1 instances.
  • Support for Oracle WebLogic Server –Oracle WebLogic support was initially featured in NetBeans IDE 6.9. In NetBeans IDE 7, users will experience fast turnaround when redeploying applications, and a “deploy on save” feature. In addition, users can perform new tasks all from within the IDE: datasource management, server library configuration, explore deployed applications and resources, view server logs, and view the admin console.

Additional application server enhancements include:

  • A new server run-time node displays deployed applications and resources.
  • Data sources can be created automatically when needed and stored in the project, and when the application is being deployed, the corresponding data source is deployed as well.
  • With new directory-based deployment, no redeployment is needed when changing Web resources, and deployment is much faster.
  • For projects enabled with JavaServer Faces (JSF), developers can choose which server library to use with tight integration for starting and stopping the server.
New Database Wizard, Maven 3 Support, HTML5 Integration, and More

NetBeans 7.0 also integrates many additional features. Highlights of these include:

  • New database wizard and support for Oracle Database – A simpler New Connection Wizard has been created for NetBeans 7.0. It allows for an easy connection to Oracle Database 10g Express Edition with predefined values. Oracle Database users can now also browse triggers along with stored procedures and functions. DDL commands can also be executed for creating stored procedures.
  • Apache Maven 3 support – Apache Maven is a software project management tool that allows developers to build and manage any Java-based project. It makes building projects easy with a uniform build system that includes management, reporting, guidelines, and more. NetBeans IDE 7.0 now supports Maven 3 with its improved usability, safe embedding, and many new features.
  • JUnit 4.8.2 integration – JUnit is a simple framework for writing repeatable tests. NetBeans IDE 7.0 provides various improvements to its support of JUnit, including version 4.8.2 integration.
  • New GridBagLayout designer – NetBeans IDE 7.0 includes a newly released GridBagLayout visual editor, which is a comprehensive and flexible layout manager for the Java platform. As an alternative to the default “Free Design” layout mode, this new visual editor is greatly improved and far more intuitive than the previous version, allowing for improved Swing GUI development.
  • HTML5 editing support – NetBeans IDE 7.0 provides full HTML5 support including editor integration (with hints, tool tips, and so on) for the new syntactical features included with HTML5.

In addition, NetBeans IDE 7.0 provides improved support for Contexts and Dependency Injection (CDI), Representational State Transfer (REST) services, and Java Persistence. For a comprehensive list of the new features and enhancements in NetBeans 7.0, please see “New and Noteworthy” on the NetBeans wiki.
NetBeans 7.0 is available for download today at NetBeans.org.

See Also

NetBeans.org

NetBeans 7.0 Download and Release Information

NetBeans 7 New and Noteworthy

Java™ Platform, Standard Edition 7 Developer Preview Release

Proposed JDK 7 Features

Project Coin

Apache Maven

JUnit