Wednesday, March 26, 2014

Run with Arguments plugin for NetBeans IDE 8.0 available on update center

The Run with Arguments plugin which I mentioned in my earlier post is now online and available on the Plugin Portal Update Center.

This means that now this plugin is available in the NetBeans IDE Plugins dialog box, in the available plugins.

This is a short demonstration for features of this plugin.  This plugin provides features to run Java projects or any Java file having main method with interactive command line arguments.

with regards
Tushar Joshi, Nagpur

Oracle Announces New NetBeans IDE 8.0 with Full Support for Java 8

I am sharing the announcement published on NetBeans Dream Team mailing list by Tinuola Awopetu AS IS here:

NetBeans IDE 8.0 delivers comprehensive support for the latest Java 8 technologies--Java SE 8, Java SE Embedded 8, and Java ME Embedded 8. The IDE also provides a range of new enhancements for Maven and Java EE with PrimeFaces; new tools for HTML5, in particular for AngularJS; and improvements to PHP and C/C++ support.

Download NetBeans IDE 8.0!

Release Highlights:
  • Java 8 technology support
  • Java EE code generators for PrimeFaces
  • New tools and performance enhancements for Maven
  • New tools for coding AngularJS
  • Tomcat 8.0 and TomEE support
  • Support for PHP 5.5
  • Enhancements for Subversion, Git and Mercurial
  • NetBeans IDE 8.0 is available in English, Brazilian Portuguese, Japanese, Russian, and Simplified Chinese.

More Information
Complete list of features in NetBeans IDE 8.0

Video: What's New in NetBeans IDE 8.0

New Screencasts and Tutorials
Oracle Press Release

Saturday, March 22, 2014

Command line Arguments for Java Projects in NetBeans IDE

Topics Covered
  1. Exploring "Run with Arguments" module
  2. Providing command line arguments to single Java Files
NBRunWithArgs is a new NetBeans IDE module which is created by yours truly :)
It is available at the URL .  To install this plug-in we have to follow these steps.

  1. Ensure you are using the latest and greatest NetBeans IDE 8.0
  2. Download the latest realease 1.1.0 NBM file from the releases page of project site.  The exact link for the download of release 1.1.0 can also be used.
  3. Open the Plugin Manager in NetBeans IDE by using Tools > Plugins menu option
  4. Navigate to the Downloaded tab and using the Add Plugins... button locate the downloaded NBM file and install it, approve the certificate.
  5. NetBeans IDE will restart and then the plugin is ready for show
How to use the plugin:

Run Project with Arguments
1. The command will be available in the Run Menu or context menu of a Java project (right click menu)

Run a single file with Arguments
This is a feature which is not available by any other way in NetBeans IDE 8.0 yet.  Even if your project has many files having main method you can right click the file you want and use the Run with Arguments command to run the file with command line arguments

Thursday, March 6, 2014

NetBeans Platform for Beginners - book by Jason Wexbridge and Walter Nyland

Recently I got a chance to read book - NetBeans Platform for Beginners by Jason Wexbridge and Walter Nyland.  I am happy to share with you all that this book has added much required and missed knowledge about NetBeans Platform in world.

Major points worth mentioning here are:

Flexible Price
The authors have chosen as their book authoring system which offers choice to the readers for paying a flexible price for the book.  The authors have kept a range of price for this book and for some days it is available for a lesser amount.  I liked this way of publishing.  Once I buy an eBook from all the updates to that book done by the author are made available to the readers which is great.

Strong theoretical base
This book takes a way of teaching where they explain the concepts involved in the chapter theoretically in details as the first part of the chapter.  The second part of each chapter presents an example using the theory presented in the first part.  I feel this is a good way of teaching for a beginners book.  It provides detailed knowledge of the elements of the NetBeans Platform and immediately they also get information about how to use the knowledge in real life scenario.

Important and necessary topics
This book covers important topics which are needed to understand the NetBeans Platform system and goes into details of those chosen topics to make the knowledge base strong for the learner.  The detailing is so fine that experienced NetBeans Platform developers will also find this book handy for reference purposes.

Complete example per chapter
The book uses a practical example per chapter which gets completed and can be implemented fully with the chapter.  The example does not depend on any other chapter exercise of examples.  I found this as a better way to do the examples.  Just because of this method learner can choose any topic and complete reading it and doing the example without depending on any other chapter for code or domain understanding.

Latest API and references
This book is the latest reference of the NetBeans Platform available now.  It also mentions many new API annotations added to the platform in the recent past. 

The book starts with Core concepts, then GUI concepts and finally some extra items like Project concept and other utilities.  The book has enough content for enabling a reader to start developing NetBeans Platform applications.  The illustrations are crisp and provided when needed.

Finally I will recommend all readers to buy this book and enrich their NetBeans Platform development toolkit.  It is a essential resource you should have in your set.  I have seen the authors of the book accepting the feedback about the book on the site readily and they are also preparing for updates to the book as and when new information becomes available.

I am grateful to Geertjan who recommended this book to me and to the authors of the book who provided discount coupon for the book purchase.  I believe this book will enrich my knowledge about NetBeans Platform and will provide detail reference when needed while developing NetBeans Platform applications.

Wednesday, July 6, 2011

NetBeans IDE 7 Cookbook

Packt Publishing has published a brand new book on NetBeans IDE, named NetBeans IDE 7 Cookbook.  This is a treat for NetBeans IDE users.  I got opportunity to review this book from Packt Publishers due to this NetBeans IDE blog.

Stay tuned for the next post where I will present my review about this book.  Meanwhile do you know that Packt Publishers have made one chapter if this book completely free and available for download?

The free chapter can be downloaded from here.

with regards
Tushar Joshi, Nagpur

Wednesday, June 8, 2011

Hierarchy View in Project Panel of NetBeans IDE

This post will cover following topics, questions:

  • How to change the package display type in NetBeans IDE?
  • How to see packages as hierarchical tree in the Projects Panel of NetBeans IDE?
  • Where is the menu to change List view to Tree view for packages in NetBeans IDE?
  • Customizing the display of Projects Panel in NetBeans IDE.
The preferences for how to see the package hierarchy in Projects Panel change from developer to developer.  Some times I like the flat display of the default NetBeans IDE Projects Panel which shows all the packages one below the other and all the classes in the package as a list below the package fully qualified name.  This makes the Projects panel only 4 node deep.

NetBeans IDE also allows us to change the display mode from List to Tree for the packages.  So instead of flat fully qualified name mode we can change the display to Tree like hierarchy mode where all the folders will also be converted to nodes and the depth of the Projects Panel tree will be deeper.

To do this we have to right click on an empty area of the Projects Panel.  The "View Java Packages As" menu only appears when we right click on an empty space of the Projects Panel.  This menu has two options and the List one is selected by default.  We can choose the Tree option to change the display of the Projects Panel to hierarchy mode.

When we change the mode to hierarchy the display looks more or less like the Files panel and the packages are shown as folder nodes.  This also makes the tree deeper according to how deep the packages are in hierarchy.

It is good to know the way to switch between these modes so that we can change the mode for some time if we want and again change it back to what it was.

The NetBeans IDE remembers your last choice by saving the preference in user directory, so when the NetBeans IDE is opened again next time the Tree mode or List mode of the Projects Panel is maintained.  

with regards
Tushar Joshi, Nagpur

Sunday, June 5, 2011

Downloading OpenJDK7 Binary for Mac OS X

 NetBeans IDE 7.0 has support for the bleeding edge OpenJDK 7.0 build release.  Even if Mac OS X does not have an official binary distribution on the Open JDK site yet, we can still get a DMG bundle of the latest build of Open JDK7 to test on Mac OS X.

Let us go through steps we need to perform to install and test OpenJDK7 on Mac OS X.  The OpenJDK7 latest binary is available on the Google Code site

The latest build available there today is seen as b144 which is the latest build available on the OpenJDK7 download page also.  This bundle is available in 32 as well as 64 bit version.

They have created a nice DMG bundle which shows the Java mascot when we open the DMG.

The installation starts as a usual Mac OS X installer bundle.  As seen from the below image this version takes 179.6 MB on disk.

Once we have installed the OpenJDK7 latest binary build.  We can start the Java Preferences application from the Spotlight and can see two more JDK instances available in the list of JDK available.  One for 32 bit and one for 64 bit.

If we choose we can set the JDK7 version default here.  I choose not to set it as default yet as it is not an official version from OpenJDK7 site.  We can still use this JDK from NetBeans by registering it as a JDK platform.

For registering the JDK7 as platform on NetBeans IDE 7.0 open up the Java Platform Manager from Tools > Java Platforms menu.  The new JDK7 will not be seen yet.  We will have to press the Add Platform button.

NetBeans IDE will point you to correct Java Library directory from where you can choose the openjdk-1.7 instance of the java platform.

When we select the openjdk-1.7 folder NetBeans IDE correctly fills all the required information and presents a prefilled dialog boz for Add Java Platform and we just have to click Next.

JDK 1.7 will start appearing in the available Java Platforms list.  As we can see NetBeans detects all the required files and documents required for registering the JDK 1.7 platform.

Now we can start any Java project and set the Java Platform as JDK 1.7.  For that we will have to open the Project Customizer by right clicking the project and choosing the Properties menu.

We need to change the Java Platform entry in the Libraries node first.

Once the Java Platform is set as JDK 1.7 in the Libraries Node it becomes available in the Sources Node also in the Source/Binary Format combo box.  We will have to set this as JDK 7 also.

Now this project is set to be compiled and run under Java 7 platform.  We can test this by adding some generics statement and NetBeans IDE offers a hint to use diamond operator (Project Coin)

NetBeans IDE will also apply those changes to the code when we select the hint as seen in the image below.

So this is how we can install latest JDK 1.7 on our Mac machines and test the JDK 7 version from NetBeans IDE 7.0 which supports JDK 1.7 features now.

with regards
Tushar Joshi, Nagpur