tag:blogger.com,1999:blog-48271303946956492512024-03-13T16:48:28.223+05:30Netbeans IDE Blog by Tushar Joshi, NagpurEntry level blog for Oracle NetBeans IDE, tutorials, experiences and news about Oracle NetBeans IDE.Tushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.comBlogger68125tag:blogger.com,1999:blog-4827130394695649251.post-72976620010044313362014-03-26T06:22:00.002+05:302014-03-26T06:46:44.984+05:30Run with Arguments plugin for NetBeans IDE 8.0 available on update center<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
The Run with Arguments plugin which I mentioned <a href="http://netbeanside61.blogspot.in/2014/03/command-line-arguments-for-java.html" target="_blank">in my earlier post</a> is now online and available on the <a href="http://plugins.netbeans.org/" target="_blank">Plugin Portal Update Center</a>.<br />
<br />
This means that now this plugin is available in the NetBeans IDE Plugins dialog box, in the available plugins.<br />
<br /></div>
<br />
<iframe width="560" height="315" src="//www.youtube.com/embed/b4Lw2F0rCK8" frameborder="0" allowfullscreen></iframe>
<br />
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.<br />
<br />
with regards<br />
Tushar Joshi, Nagpur </div>
Tushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com4tag:blogger.com,1999:blog-4827130394695649251.post-4495742242212385782014-03-26T06:10:00.003+05:302014-03-26T06:10:41.500+05:30Oracle Announces New NetBeans IDE 8.0 with Full Support for Java 8<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-WTG5hlvRoHo/UzIhksx9UEI/AAAAAAAADp0/h2iKcNnR6qQ/s1600/Screen+Shot+2014-03-26+at+6.06.27+am.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-WTG5hlvRoHo/UzIhksx9UEI/AAAAAAAADp0/h2iKcNnR6qQ/s1600/Screen+Shot+2014-03-26+at+6.06.27+am.png" /></a></div>
<br />
I am sharing the announcement published on NetBeans Dream Team mailing list by Tinuola Awopetu AS IS here:<br />
<br /><a href="http://netbeans.org/community/releases/80/">NetBeans IDE 8.0</a> 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. <br /> <br /><a href="http://netbeans.org/downloads/">Download NetBeans IDE 8.0!</a> <br /><br />Release Highlights:<br /><ul>
<li>Java 8 technology support </li>
<li>Java EE code generators for PrimeFaces </li>
<li>New tools and performance enhancements for Maven </li>
<li>New tools for coding AngularJS </li>
<li>Tomcat 8.0 and TomEE support </li>
<li>Support for PHP 5.5 </li>
<li>Enhancements for Subversion, Git and Mercurial </li>
<li>NetBeans IDE 8.0 is available in English, Brazilian Portuguese, Japanese, Russian, and Simplified Chinese. </li>
</ul>
<br /> More Information <br /><a href="http://wiki.netbeans.org/NewAndNoteworthyNB80">Complete list of features in NetBeans IDE 8.0<br /> </a> <br />Video: <a href="https://netbeans.org/kb/docs/ide/overview-screencast.html">What's New in NetBeans IDE 8.0</a><br /> <br />New <a href="http://netbeans.org/kb/docs/intro-screencasts.html">Screencasts</a> and <a href="http://netbeans.org/kb/kb.html">Tutorials</a><br /> <a href="http://www.oracle.com/us/corporate/press/2173412">Oracle Press Release</a><br /></div>
Tushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com0tag:blogger.com,1999:blog-4827130394695649251.post-63726898985206776932014-03-22T00:43:00.005+05:302014-03-22T00:43:46.395+05:30Command line Arguments for Java Projects in NetBeans IDE<div dir="ltr" style="text-align: left;" trbidi="on">
Topics Covered<br />
<ol style="text-align: left;">
<li>Exploring "Run with Arguments" module</li>
<li>Providing command line arguments to single Java Files</li>
</ol>
NBRunWithArgs is a new NetBeans IDE module which is created by yours truly :)<br />
It is available at the URL <a href="https://github.com/tusharvjoshi/nbrunwithargs">https://github.com/tusharvjoshi/nbrunwithargs</a> . To install this plug-in we have to follow these steps.<br />
<br />
<ol style="text-align: left;">
<li>Ensure you are using the latest and greatest NetBeans IDE 8.0</li>
<li>Download the latest realease 1.1.0 NBM file from the <a href="https://github.com/tusharvjoshi/nbrunwithargs/releases" target="_blank">releases page</a> of project site. The exact link for the download of <a href="https://github.com/tusharvjoshi/nbrunwithargs/releases/download/release1.1.0/com-tusharjoshi-runargs.nbm" target="_blank">release 1.1.0</a> can also be used.</li>
<li>Open the Plugin Manager in NetBeans IDE by using Tools > Plugins menu option</li>
<li>Navigate to the Downloaded tab and using the Add Plugins... button locate the downloaded NBM file and install it, approve the certificate.</li>
<li>NetBeans IDE will restart and then the plugin is ready for show</li>
</ol>
<b>How to use the plugin:</b><br />
<br />
<b>Run Project with Arguments</b><br />
1. The command will be available in the Run Menu or context menu of a Java project (right click menu)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-SQyW552dZ9k/UyyPLopwoQI/AAAAAAAADpI/czl0LA8yrzo/s1600/runargs-context-menu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-SQyW552dZ9k/UyyPLopwoQI/AAAAAAAADpI/czl0LA8yrzo/s1600/runargs-context-menu.png" /></a></div>
<br />
<br />
<b>Run a single file with Arguments</b><br />
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<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-j851LEi4zS8/UyyPR41e_4I/AAAAAAAADpQ/kaXUjyhBT-4/s1600/runargs-dialog.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-j851LEi4zS8/UyyPR41e_4I/AAAAAAAADpQ/kaXUjyhBT-4/s1600/runargs-dialog.png" /></a></div>
<br /></div>
Tushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com7tag:blogger.com,1999:blog-4827130394695649251.post-64931021295958871592014-03-06T19:22:00.002+05:302014-03-06T19:22:18.408+05:30NetBeans Platform for Beginners - book by Jason Wexbridge and Walter Nyland<div dir="ltr" style="text-align: left;" trbidi="on">
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.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://leanpub.com/nbp4beginners"><img alt="https://leanpub.com/nbp4beginners" border="0" src="http://1.bp.blogspot.com/-zK75oINI_gk/Uxh3ripG2FI/AAAAAAAADoU/Leo2QyGHfio/s1600/nbpbeginners.png" /></a></div>
<br />
Major points worth mentioning here are:<br />
<br />
<b>Flexible Price</b><br />
The authors have chosen <a href="https://leanpub.com/" target="_blank">Leanpub.com</a> 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 <a href="https://leanpub.com/" target="_blank">Leanpub.com</a> all the updates to that book done by the author are made available to the readers which is great.<br />
<br />
<b>Strong theoretical base</b><br />
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.<br />
<br />
<b>Important and necessary topics</b><br />
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.<br />
<br />
<b>Complete example per chapter</b><br />
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.<br />
<br />
<b>Latest API and references</b><br />
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. <br />
<br />
<b>Content</b><br />
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.<br />
<br />
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.<br />
<br />
I am grateful to <a href="https://twitter.com/GeertjanW" target="_blank">Geertjan </a>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.</div>
Tushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com0tag:blogger.com,1999:blog-4827130394695649251.post-50017109988295669362011-07-06T09:18:00.000+05:302011-07-06T09:18:54.814+05:30NetBeans IDE 7 Cookbook<div class="separator" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" src="http://3.bp.blogspot.com/-o9XJTmMPQb4/ThPaInz7cvI/AAAAAAAAC1I/sd0meZ1jzEk/s1600/NetBeans+IDE+7+Cookbook.jpg" /></div><br />
Packt Publishing has published a brand new book on NetBeans IDE, named <a href="http://www.packtpub.com/netbeans-ide-7-cookbook/book">NetBeans IDE 7 Cookbook</a>. This is a treat for NetBeans IDE users. I got opportunity to review this book from Packt Publishers due to this NetBeans IDE blog.<br />
<br />
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?<br />
<br />
The free chapter can be downloaded from <a href="http://www.packtpub.com/sites/default/files/2503OS-Chapter-7-EJB-Application.pdf?utm_source=packtpub&utm_medium=free&utm_campaign=pdf">here</a>.<br />
<br />
with regards<br />
Tushar Joshi, NagpurTushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com2tag:blogger.com,1999:blog-4827130394695649251.post-17112639248032150842011-06-08T09:05:00.001+05:302011-06-08T09:06:39.689+05:30Hierarchy View in Project Panel of NetBeans IDEThis post will cover following topics, questions:<br />
<ul><li>How to change the package display type in NetBeans IDE?</li>
<li>How to see packages as hierarchical tree in the Projects Panel of NetBeans IDE?</li>
<li>Where is the menu to change List view to Tree view for packages in NetBeans IDE?</li>
<li>Customizing the display of Projects Panel in NetBeans IDE.</li>
</ul>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.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-FssjBF3H9QA/Te7rjGvmw_I/AAAAAAAAC0U/8RKBdx1tfK8/s1600/1.flat-hierarchy.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-FssjBF3H9QA/Te7rjGvmw_I/AAAAAAAAC0U/8RKBdx1tfK8/s1600/1.flat-hierarchy.png" /></a></div><br />
<div style="text-align: left;"></div><div class="separator" style="clear: both;">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.</div><div class="separator" style="clear: both;"><br />
</div><div class="separator" style="clear: both;">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.</div><div class="separator" style="clear: both;"></div><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-9cStrYRBCmA/Te7rkrOTvzI/AAAAAAAAC0Y/8ERpAX6WiN8/s1600/2.hierarchy-menu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-9cStrYRBCmA/Te7rkrOTvzI/AAAAAAAAC0Y/8ERpAX6WiN8/s1600/2.hierarchy-menu.png" /></a></div><br />
<br />
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.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-CnTyHkPLaGQ/Te7rl7zDuSI/AAAAAAAAC0c/hx069SECDOY/s1600/3.hierarchy-shown.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-CnTyHkPLaGQ/Te7rl7zDuSI/AAAAAAAAC0c/hx069SECDOY/s1600/3.hierarchy-shown.png" /></a></div><br />
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.<br />
<br />
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. <br />
<br />
with regards<br />
Tushar Joshi, NagpurTushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com7tag:blogger.com,1999:blog-4827130394695649251.post-20979089513757682832011-06-05T15:48:00.000+05:302011-06-05T15:48:29.005+05:30Downloading OpenJDK7 Binary for Mac OS X<div class="separator" style="clear: both; text-align: center;"></div> 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.<br />
<br />
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 <a href="http://code.google.com/p/openjdk-osx-build/">http://code.google.com/p/openjdk-osx-build/</a><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-8US9Hc9Dqbk/TetSARRiGEI/AAAAAAAACzc/NkdZTcGVbGI/s1600/2.openjdk-download.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-8US9Hc9Dqbk/TetSARRiGEI/AAAAAAAACzc/NkdZTcGVbGI/s1600/2.openjdk-download.png" /></a></div><br />
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.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-iVhoAqZ4rHE/TetSBzLLNSI/AAAAAAAACzg/zJdcGEjAxc0/s1600/3.latest-build.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="263" src="http://3.bp.blogspot.com/-iVhoAqZ4rHE/TetSBzLLNSI/AAAAAAAACzg/zJdcGEjAxc0/s640/3.latest-build.png" width="640" /></a></div><br />
They have created a nice DMG bundle which shows the Java mascot when we open the DMG.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-yeAkjPiCFnc/TetSC_c1VDI/AAAAAAAACzk/kUchY0yhAPA/s1600/4.dmg-inmac.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://4.bp.blogspot.com/-yeAkjPiCFnc/TetSC_c1VDI/AAAAAAAACzk/kUchY0yhAPA/s640/4.dmg-inmac.png" width="595" /></a></div><br />
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.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-rETMN0ZI_Lw/TetSD3Y-12I/AAAAAAAACzo/AIDMRwbcxDI/s1600/5.installation.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-rETMN0ZI_Lw/TetSD3Y-12I/AAAAAAAACzo/AIDMRwbcxDI/s1600/5.installation.png" /></a></div><br />
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.<br />
<br />
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.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-FkXIAK2WjYA/TetSEwJcdII/AAAAAAAACzs/VyqPfPJC4uk/s1600/6.java-prefs.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="471" src="http://1.bp.blogspot.com/-FkXIAK2WjYA/TetSEwJcdII/AAAAAAAACzs/VyqPfPJC4uk/s640/6.java-prefs.png" width="640" /></a></div><br />
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.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-gnQYp631cBk/TetSGctV-NI/AAAAAAAACzw/X3PS_RIKJtE/s1600/7.add-platform-nb.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="444" src="http://4.bp.blogspot.com/-gnQYp631cBk/TetSGctV-NI/AAAAAAAACzw/X3PS_RIKJtE/s640/7.add-platform-nb.png" width="640" /></a></div><br />
NetBeans IDE will point you to correct Java Library directory from where you can choose the openjdk-1.7 instance of the java platform.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-vGN-Get-o4U/TetSHO1C_AI/AAAAAAAACz0/6MALfj9VIc8/s1600/8.select-openjdk7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-vGN-Get-o4U/TetSHO1C_AI/AAAAAAAACz0/6MALfj9VIc8/s1600/8.select-openjdk7.png" /></a></div><br />
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.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-mycx92BGQ6M/TetSIBGMr8I/AAAAAAAACz4/Qb-nFdnLoAk/s1600/9.auto-detect-settings7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="298" src="http://4.bp.blogspot.com/-mycx92BGQ6M/TetSIBGMr8I/AAAAAAAACz4/Qb-nFdnLoAk/s640/9.auto-detect-settings7.png" width="640" /></a></div><br />
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.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-u9gWLMLXWzE/TetSJhtlqdI/AAAAAAAACz8/KWx8fuQcdwY/s1600/10.add-jdk7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="436" src="http://1.bp.blogspot.com/-u9gWLMLXWzE/TetSJhtlqdI/AAAAAAAACz8/KWx8fuQcdwY/s640/10.add-jdk7.png" width="640" /></a></div><br />
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.<br />
<br />
We need to change the Java Platform entry in the Libraries node first.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-OPoG-MsweoM/TetSKup4esI/AAAAAAAAC0A/lgyjK397Tcs/s1600/11.lib-setting-first.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="476" src="http://2.bp.blogspot.com/-OPoG-MsweoM/TetSKup4esI/AAAAAAAAC0A/lgyjK397Tcs/s640/11.lib-setting-first.png" width="640" /></a></div><br />
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.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-oM3jxBZmXRw/TetSLrCJ_cI/AAAAAAAAC0E/P5sFZdVUALg/s1600/12.sources-next.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="476" src="http://4.bp.blogspot.com/-oM3jxBZmXRw/TetSLrCJ_cI/AAAAAAAAC0E/P5sFZdVUALg/s640/12.sources-next.png" width="640" /></a></div><br />
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) <br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-974Edpw5D8Q/TetSMwxfZQI/AAAAAAAAC0I/etCmyolNmKw/s1600/13.app-showing-7hint.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="366" src="http://2.bp.blogspot.com/-974Edpw5D8Q/TetSMwxfZQI/AAAAAAAAC0I/etCmyolNmKw/s640/13.app-showing-7hint.png" width="640" /></a></div><br />
NetBeans IDE will also apply those changes to the code when we select the hint as seen in the image below.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-xsI0U2jYM5g/TetSOKR6pWI/AAAAAAAAC0M/pO8KcWpyfQc/s1600/14.app-with-jdk7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="378" src="http://4.bp.blogspot.com/-xsI0U2jYM5g/TetSOKR6pWI/AAAAAAAAC0M/pO8KcWpyfQc/s640/14.app-with-jdk7.png" width="640" /></a></div><br />
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.<br />
<br />
with regards<br />
Tushar Joshi, NagpurTushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com8tag:blogger.com,1999:blog-4827130394695649251.post-3752023902639027482011-04-25T08:29:00.000+05:302011-04-25T08:29:07.629+05:30When you file bugs with NetBeans IDE<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-mYkdiBOajMY/TbTiKYi2d-I/AAAAAAAACxk/zChx4EkRWoI/s1600/netbeans-quality-mail%2Bcopy.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-mYkdiBOajMY/TbTiKYi2d-I/AAAAAAAACxk/zChx4EkRWoI/s1600/netbeans-quality-mail%2Bcopy.png" /></a></div>When we file bugs with the <a href="http://netbeans.org/community/issues.html">NetBeans IDE issue tracking system</a>, and when they are resolved, we get a mail as above. After a major release like the current release <a href="http://netbeans.org/community/releases/70/install.html">NetBeans IDE 7.0</a> the NetBeans quality team send such messages to the reporters of the bugs which got resolved.<br />
<br />
This is a very good feature and I liked it. It feels like someone is really listening and coming back with solutions.<br />
<br />
Thanks you <a href="http://netbeans.org/">NetBeans</a> Team.<br />
<br />
with regards<br />
Tushar Joshi, NagpurTushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com0tag:blogger.com,1999:blog-4827130394695649251.post-31971253730412721682011-04-21T08:36:00.000+05:302011-04-21T08:36:22.757+05:30Download your copy of NetBeans IDE 7.0<div class="separator" style="clear: both; text-align: center;"><a href="http://netbeans.org/community/releases/70/"><br />
<img border="0" src="http://3.bp.blogspot.com/-jCwNTOZCnCA/Ta-eUq1rDgI/AAAAAAAACxU/8R8acXRhCaA/s1600/Screen%2Bshot%2B2011-04-21%2Bat%2B8.30.42%2BAM.png" /></a></div>NetBeans IDE 7.0 is released and available for <a href="http://netbeans.org/community/releases/70/">download from the NetBeans site</a>.<br />
<br />
NetBeans IDE 7.0 features the following changes:<br />
<ul><li>Introduction of JDK 7 support including editor enhancements (syntax, hints)</li>
<li>Revamped support for WebLogic Application Server and GlassFish 3.1</li>
<li>Oracle Database improvements</li>
<li>HTML5 editing support</li>
<li>Maven 3 is supported and bundled with the IDE</li>
<li>Improved support for CDI, REST services, Java Persistence, and Bean Validation</li>
<li>PHP Rename Refactoring</li>
<li>Line wrapping</li>
<li>Improved detection of external changes (native file system listening)</li>
<li>Updates to the C/C++ support (remote file system browsing, library projects running/debugging, enhanced templates/specializations) </li>
<li>Support for Git 1.7.х</li>
<li>Additional enhancements are listed at the <a href="http://wiki.netbeans.org/NewAndNoteworthyNB70" target="_blank">NetBeans IDE 7.0 New and Noteworthy</a> page</li>
</ul>For more about this release, see the <a href="http://netbeans.org/community/releases/70/index.html">NetBeans IDE 7.0 Release Information</a> page.<br />
<br />
with regards<br />
Tushar Joshi, NagpurTushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com0tag:blogger.com,1999:blog-4827130394695649251.post-78251965968204347482010-09-15T11:52:00.005+05:302010-09-15T14:01:21.510+05:30Changing Help Brower font-size in NetBeans IDE<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><br />
Help Browser font is not configurable in NetBeans. After <a href="http://netbeans.org/bugzilla/show_bug.cgi?id=162964">detailed discussion</a> it was set to such a value which will be usable for all operating systems.<br />
<br />
So there is no normal way to change the font for the Help Browser. There is a hack around this, knowing the fact that the Help browser uses HTML and CSS files. You can change the CSS definition of the <b>body</b> and <b>p</b> elements in the CSS file which is used for the Help Browser. The downside is you have to edit this file any time you want the font size to be changed.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/_fcQoj48LYPE/TJBkpYSBqFI/AAAAAAAACqo/RSM7zmDq_7A/s1600/2010-09-14_21.47.54.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://1.bp.blogspot.com/_fcQoj48LYPE/TJBkpYSBqFI/AAAAAAAACqo/RSM7zmDq_7A/s400/2010-09-14_21.47.54.png" width="385" /></a></div><br />
The image above is what you will see if you open the Help Browser on a Mac.<br />
<br />
If for some reason you want the font size bigger then the way to change font size is to open the ide.css file located in the paths below and change the "font-size: medium" definition to "font-size: large" for body and p element definitions. In fact you can use any value acceptable for fond size in CSS files.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/_fcQoj48LYPE/TJBiukRtNPI/AAAAAAAACqg/i3WDePWC7p0/s1600/ide.css+changes.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/_fcQoj48LYPE/TJBiukRtNPI/AAAAAAAACqg/i3WDePWC7p0/s320/ide.css+changes.png" /></a></div><br />
Path for the usersguide CSS file on different platforms:<br />
<br />
On Mac<br />
/Applications/NetBeans/NetBeans 6.9.1.app/Contents/Resources/NetBeans/ide/docs/org/netbeans/modules/usersguide/ide.css<br />
<br />
On Ubuntu<br />
$USERHOME/netbeans-6.9.1/ide/docs/org/netbeans/modules/usersguide/ide.css<br />
<br />
On Windows 7<br />
C:\Program Files\NetBeans 6.9.1\ide\docs\org\netbeans\modules\usersguide\ide.css<br />
<br />
After changing the font-size to large:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/_fcQoj48LYPE/TJBlT-KzemI/AAAAAAAACqw/F0lX2LXvPZc/s1600/2010-09-15_11.43.42.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://1.bp.blogspot.com/_fcQoj48LYPE/TJBlT-KzemI/AAAAAAAACqw/F0lX2LXvPZc/s400/2010-09-15_11.43.42.png" width="386" /></a></div>You can see the Help Browser font is now bigger.<br />
<br />
One better way of doing customizations in the ide.css file could be adding a customization section at the end of the file as follows:<br />
<br />
<div class="mycode">/* Help Font Customization section */<br />
body, p { font-size: large; }<br />
/* end customization */<br />
</div><br />
with regards<br />
Tushar Joshi, NagpurTushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com0tag:blogger.com,1999:blog-4827130394695649251.post-91760390758894666942010-09-13T12:53:00.001+05:302010-09-13T13:04:01.849+05:30Book Review: NetBeans Platform 6.9 Developer's Guide by Jurgen Petri<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/_fcQoj48LYPE/TI3QNP09IUI/AAAAAAAACp8/r4vVZwVrVik/s1600/Screen+shot+2010-09-13+at+12.46.50+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/_fcQoj48LYPE/TI3QNP09IUI/AAAAAAAACp8/r4vVZwVrVik/s320/Screen+shot+2010-09-13+at+12.46.50+PM.png" /></a></div><br />
This book <a href="http://www.packtpub.com/netbeans-platform-6-9-developers-guide/book">NetBeans Platform 6.9 Developer's Guide</a> offers to help you in your transition from a Java Developer to become a NetBeans Platform Developer. The approach used in this book is an approach by example. Teaching through an example is a powerful pedagogical pattern which works. This book has assumed a requirement for creating a software with certain features and gradually progresses to develop this assumed software through many chapters. Through different chapters this book tries to teach a developer new concepts which are used in NetBeans Platform like Lookup, Window Systems, Nodes, File System and layer mechanism to name a few. I liked this approach of teaching through an example software requirement.<br />
<br />
Developers are most comfortable when someone explains them through code examples. When a book offers learning by example it is always a pleasure. My first reaction was to search for any code sample if provided by the publishing company. I downloaded the code sample from Packt Publishing book page. When developers try to learn a new concept and write code according to instructions the sample code provide a check point to compare whether they have done it write.<br />
<br />
The code sample provides significant data to compare but it would be more helpful with some additional things mentioned below:<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/_fcQoj48LYPE/TI3K6k_fQTI/AAAAAAAACps/wxOWB-uvYb8/s1600/TaskManagers+Module+errors.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/_fcQoj48LYPE/TI3K6k_fQTI/AAAAAAAACps/wxOWB-uvYb8/s320/TaskManagers+Module+errors.png" /></a></div><br />
<ol><li>As of today the code sample does not compile on NetBeans IDE 6.9 out of the box, as it needs some changes in the settings</li>
<li>The presentation locale for the code sample is in German and hence less intuitive to an English reader</li>
<li>The changes in the settings like Lookup module, deprecated Swing extension module can be done by developers who already know some NetBeans platform concepts but for a total beginner they may render the code sample useless.</li>
<li>The code sample is the final version of the software which gets developed progressively through the chapters so it does not help much in the initial chapters, if the code sample is available in chapter wise format it will be a great aid for the book.</li>
</ol><br />
The instructions given in the book if followed word by word and line by line, then they do not work in some places. This was a frustrating thing for me. I could figure out the changes needed as I am well ahead in the NetBeans Platform learning curve and have read 2 more books on NetBeans Platform and have watched the top 10 API videos by Geertjan. <br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/_fcQoj48LYPE/TI3LA02ivvI/AAAAAAAACp0/EfWW4IQO2og/s1600/packt+site+errata+page.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://1.bp.blogspot.com/_fcQoj48LYPE/TI3LA02ivvI/AAAAAAAACp0/EfWW4IQO2og/s640/packt+site+errata+page.png" width="456" /></a></div><br />
<br />
For a total beginner the instructions given in the book MUST work when followed exactly word by word and line by line, to give a smooth experience and to avoid frustration. For me this doesn't happened with this book. Blindly following the instructions in the book do not lead to smooth running application and need some refactoring of access (like making certain packages public), one misplaced illustration as mentioned in the the errata on NetBeans wiki and other corrections also mentioned on the errata page.<br />
<br />
I came to know about the <a href="https://www.packtpub.com/support?nid=4464">ERRATA</a> for this book at Packt Publishing site and also one <a href="http://wiki.netbeans.org/PetriEnglishTranslationErrata">ERRATA</a> maintained by community at the NetBeans Wiki <a href="http://wiki.netbeans.org/PetriEnglishTranslationErrata">here</a>. This Errata is a MUST to follow to make the instructions in the book work for you. So using this book plus the errata on the NetBeans wiki makes the book complete in all the instructions. With this correction this book will help a Java developer kick start as a NetBeans Developer. <br />
<br />
In summary the plus points of the book are:<br />
<ol><li>Teaching by example pedagogical approach</li>
<li>Way of teaching and the language is easy to understand.</li>
<li>Lots of illustrations </li>
<li>Step by step instructions which can be followed to recreate what has been taught (Requires help from <a href="http://wiki.netbeans.org/PetriEnglishTranslationErrata">errata published on NetBeans wiki</a>)</li>
<li>Experience of creating a complete software using NetBeans Platform towards the end of the book</li>
</ol><br />
and the minus points, which I believe will be corrected gradually by Packt publishing by publishing complete errata on their site and fixing the text in next edition<br />
<ol><li>Code sample not chapter wise</li>
<li>Code sample not in English locale</li>
<li>Many corrections required in book to make it work in code as expected by the author. This point is disappointing for a total new developer as they may have no clue about how to correct these errors, and the <a href="http://wiki.netbeans.org/PetriEnglishTranslationErrata">errata maintained by community</a> is a must reference in that case.</li>
</ol><br />
In conclusion Packt Publishing has added one more interesting book in the range of <a href="http://platform.netbeans.org/articles/books.html">NetBeans Platform learning books</a>. This book gives the feel of NetBeans Platform development quickly and provides opportunity for developers to kick start their journey in the NetBeans Platform land.<br />
<br />
With regards<br />
Tushar Joshi, Nagpur<br />
<br />
.Tushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com0tag:blogger.com,1999:blog-4827130394695649251.post-78527723494431435002010-09-13T12:17:00.001+05:302010-09-13T12:19:48.275+05:30Netbeans IDE is powered by NetBeans Platform.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/_fcQoj48LYPE/TI3JYSDcHrI/AAAAAAAACpk/VQNzm4YCxa8/s1600/netbeans+platform+graphic.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/_fcQoj48LYPE/TI3JYSDcHrI/AAAAAAAACpk/VQNzm4YCxa8/s320/netbeans+platform+graphic.png" /></a></div><br />
NetBeans IDE is built upon a software system called as NetBeans Platform. NetBeans Platform is used in software <a href="http://netbeans.org/about/history.html">development since year 2000</a> when it went open source. NetBeans Platform is a framework which enables rapid desktop application development. It is an evolving platform and can do much more than rapid application development. <br />
<br />
When we start developing a Java application, to achieve some business requirement; we often encounter a set of similar minimum requirements for a software. <br />
<br />
The requirements like: <br />
<br />
<ul><li>Software shall be modular, which will enable us to turn modules on or off. </li>
<li>Software shall be extensible, which will make it easy to add more functionality and extend the existing functionality. </li>
<li>Software shall have a consistent User Interface and shall follow industry standards for graphical user interface. </li>
<li>Software shall provide multithreaded approach for parallel tasks. </li>
<li>Software shall contain configurable settings for many features offered in it </li>
<li>Software shall have dockable windows </li>
<li>Software shall be cross platform </li>
<li>Software shall have cross platform deployment mechanism in such a way that native operating system users are comfortable with it </li>
<li>Software shall have a update mechanism, which will enable the user to update the modules online </li>
<li>Software shall have module versioning feature which enable developers to create modules for the software which depend on certain version of earlier modules </li>
</ul><a href="http://netbeans.org/features/platform/index.html">NetBeans Platform</a> <a href="http://netbeans.org/features/platform/index.html"></a>provides solutions for all the requirements mentioned above in a time tested way. It is prudent to use such a platform to develop softwares having more than one of the requirements listed above to save time in architectural features which are necessary for the stability and usability of the software. <br />
<br />
This out of the box feature availability is the reason why the people listed in the <a href="http://netbeans.org/features/platform/showcase.html">NetBeans Showcase</a> have chosen NetBeans Platform to build their software applications. I got acquainted with the NetBeans Platform when I started writing this blog and I was fascinated with the platform. Obviously my next step was to start learning this framework and I started searching for documentation and books. <br />
<br />
Many things are helping me learning the NetBeans Platform like: <br />
<ul><li><a href="http://platform.netbeans.org/articles/books.html">Books written by NetBeans Platform gurus</a> </li>
<li><a href="http://www.planetnetbeans.org/">Blogs written by veteran NetBeans developers and technical writers </a></li>
<li><a href="http://platform.netbeans.org/tutorials/nbm-10-top-apis.html">Video tutorials</a> by <a href="http://blogs.sun.com/geertjan/">Geertjan</a> </li>
</ul>What I found out from my learning is that there is a learning curve associated with NetBeans Platform as it was developed through many years and contains tons of patterns and practices. But, once you acquire the skill of using NetBeans Platform it is a pleasurable experience and efficient way of developing Java applications. <br />
<br />
To make the learning easy for new developers <a href="http://www.packtpub.com/">Packt Publishing</a> has published a new book for NetBeans Platform named <a href="https://www.packtpub.com/netbeans-platform-6-9-developers-guide/book">NetBeans Platform 6.9 Developer's Guide</a> by Jürgen Petri. Initially this was a book in German language which is translated by the NetBeans Community in english to make it available for wider audience in the world. <br />
<br />
I was asked by Packt Publishing to review this book because of my association with NetBeans IDE and because of this blog where I write about NetBeans IDE. It was a pleasure receiving a complimentary PDF copy of the book and going through all the concepts presented by the book. <br />
<br />
With regards <br />
Tushar Joshi, Nagpur<br />
<br />
.Tushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com0tag:blogger.com,1999:blog-4827130394695649251.post-39942642971586925012010-08-16T18:27:00.001+05:302010-09-12T10:17:14.529+05:30NetBeans Platform 6.9 Developer's Guide<div class="separator" style="clear: both; text-align: center;"><a href="https://www.packtpub.com/netbeans-platform-6-8-developers-guide/book" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="http://4.bp.blogspot.com/_fcQoj48LYPE/TGk0ucLbkzI/AAAAAAAACl4/IISzKRXV5rw/s640/netbeans-6.9-platform-book.png" width="508" /></a></div><br />
Packt publishing has published a new book on the development of NetBeans Platform applications named <a href="https://www.packtpub.com/netbeans-platform-6-8-developers-guide/book">NetBeans Platform 6.9 Developer's Guide</a>. The description of the book says that:<br />
<br />
This book guides you through the development of a complete Swing application built on the NetBeans Platform. Each chapter introduces a number of new concepts relating to a theme, such as the window system, and then shows you how to implement the concepts in the application you are creating. At the end of the book you have a task manager, which you can adapt to your own purposes. Or you can, of course, create your own applications, now that you have built up a solid basis of NetBeans Platform knowledge.<br />
<br />
I will be presenting a detailed review of this book, in my next post.<br />
<br />
[UPDATE Sep 12, 2010] I started evaluating this book like a total beginner, and it is taking me some time to go through the sample code and to reproduce what is taught. This is helping me understand what a new learner will feel after reading this book. I will post my review soon. <br />
<br />
with regards<br />
Tushar Joshi, NagpurTushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com0tag:blogger.com,1999:blog-4827130394695649251.post-81166090468094836772010-04-23T11:04:00.000+05:302010-04-23T11:04:11.542+05:30Download NetBeans IDE 6.9 Beta<div class="separator" style="clear: both; text-align: center;"><a href="http://download.netbeans.org/netbeans/6.9/beta/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/_fcQoj48LYPE/S9Ev0OZ4v_I/AAAAAAAACVA/UW3qH8EhKe8/s320/Screen+shot+2010-04-23+at+10.56.55+AM.png" /></a></div><span id="goog_498265062"></span><span id="goog_498265063"></span><br />
<br />
Tinuola Awopetu announced the availability of NetBeans IDE 6.9 Beta on NetBeans Mailing lists. The announcement is as follows: <br />
<br />
NetBeans 6.9 Beta introduces the JavaFX Composer, a visual layout tool for visually building JavaFX GUI applications, similar to the Swing GUI builder for Java SE applications. Additional highlights include OSGi interoperability for NetBeans Platform applications; support for JavaFX SDK 1.3, PHP Zend framework, and Ruby on Rails 3.0; as well as improvements to the Java Editor, Java Debugger, and issue tracking, and more. NetBeans 6.9 Beta is available in English, Brazilian Portuguese, Japanese and Simplified Chinese, as well as in several community-translated languages.<br />
<br />
<b>Release Highlights:<br />
<br />
OSGi</b><br />
<ul><li>Develop OSGi bundles with Maven</li>
<li>Bundled Felix container and ability to register other containers such as Equinox</li>
</ul><b>NetBeans Platform</b><br />
<ul><li>OSGi interoperability: Developing and consuming OSGi bundles in Platform-based applications</li>
<li>Felix 2.0.3 OSGi support, experimental Equinox support </li>
</ul><b>JavaFX</b><br />
<ul><li>JavaFX Composer for form-like UI components with states and access to various data sources<br />
</li>
<li>Added and improved editor hints and refactoring</li>
</ul><b>Java EE</b><br />
<ul><li>Support for Contexts and Dependency Injection (CDI) (JSR-299)</li>
<li>Spring Framework 3.0 support </li>
</ul><b>Java</b><br />
<ul><li>Java Debugger: Breakpoint grouping, attach parameter history</li>
<li>Support for annotation processors in the editor, configurable in the Project Properties </li>
</ul><b>PHP</b><br />
<ul><li>Zend Framework support<br />
</li>
<li>"Overrides/Implements" and "Is Overridden/Implemented" annotations </li>
</ul><b>Ruby</b><br />
<ul><li>Ruby on Rails 3.0 support</li>
</ul><b>C/C++</b><br />
<ul><li>"Overrides/Is Overridden" annotations and hyperlink navigation</li>
<li>Console type "Internal Terminal" </li>
</ul>To learn more visit this link about <a href="http://netbeans.org/community/releases/69/" target="_blank">Beta release</a>.<br />
<br />
The final release of NetBeans 6.9 is planned for June 2010. <a href="http://download.netbeans.org/netbeans/6.9/beta/" target="_blank">Download Beta</a> today and <a href="http://netbeans.org/about/contact_form.html?to=2" target="_blank">give feedback</a> about your experience with it. You can also join discussions about the NetBeans IDE and the NetBeans Platform on <a href="http://netbeans.org/community/lists/index.html" target="_blank">mailing lists and forums</a>. If you blog about using NetBeans add your blog to <a href="http://planetnetbeans.org/" target="_blank">Planet NetBeans</a>. Follow <a href="http://twitter.com/netbeans" target="_blank">NetBeans on Twitter</a> for updates about NetBeans news and development.<br />
<br />
with regards<br />
Tushar Joshi, NagpurTushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com0tag:blogger.com,1999:blog-4827130394695649251.post-34963126773204798202009-08-23T07:36:00.008+05:302009-08-26T09:19:10.053+05:30Making executable desktop application in NetBeans<div>UPDATE (26 Aug 2009): NetBeans IDE can create executable JAR for any Java project. The steps described in this post are just one way of creating the executable JAR and not the only way. Following the steps described in this post any Java project can be bundled as a JAR executable project.<br /><br /><br />Topics covered in this post:</div><div><ol><li>How to create a desktop application in NetBeans?</li><li>Where is the JAR file after building the application in NetBeans?</li><li>Can a Java Desktop application started by double clicking?</li></ol><div>We will start with creating a New Project in NetBeans. This is done by choosing menu File > New Project...</div></div><div><br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fcQoj48LYPE/SpCoR14tZTI/AAAAAAAABrw/og_9syLGZ30/s1600-h/1.new-project.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 245px; height: 256px;" src="http://3.bp.blogspot.com/_fcQoj48LYPE/SpCoR14tZTI/AAAAAAAABrw/og_9syLGZ30/s400/1.new-project.png" alt="" id="BLOGGER_PHOTO_ID_5372979379929179442" border="0" /></a><br /><div>In the New Project dialog box choose Java in categories and Java Desktop Application in the projects List box. Then click the Next button.<div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fcQoj48LYPE/SpCoRRbHJ1I/AAAAAAAABro/3EU_R8Pephk/s1600-h/2.desktop-app-select.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 276px;" src="http://3.bp.blogspot.com/_fcQoj48LYPE/SpCoRRbHJ1I/AAAAAAAABro/3EU_R8Pephk/s400/2.desktop-app-select.png" alt="" id="BLOGGER_PHOTO_ID_5372979370141362002" border="0" /></a><br /></div><div>Choose all the default values offered by NetBeans IDE in the New Desktop Application dialog as we want to see what is offered as defaults by NetBeans. Click Finish to allow NetBeans to create a new project for us.</div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fcQoj48LYPE/SpCoQwWZAYI/AAAAAAAABrg/NK4ELHlwZ48/s1600-h/3.accept-defaults.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 276px;" src="http://3.bp.blogspot.com/_fcQoj48LYPE/SpCoQwWZAYI/AAAAAAAABrg/NK4ELHlwZ48/s400/3.accept-defaults.png" alt="" id="BLOGGER_PHOTO_ID_5372979361263190402" border="0" /></a><br /></div><div>After we click finish we get a desktop application with some boilerplate code and windows.</div><div><br /></div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_fcQoj48LYPE/SpCoQhLzDiI/AAAAAAAABrY/E0OOGX_9F7M/s1600-h/4.what-we-get.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 374px; height: 385px;" src="http://4.bp.blogspot.com/_fcQoj48LYPE/SpCoQhLzDiI/AAAAAAAABrY/E0OOGX_9F7M/s400/4.what-we-get.png" alt="" id="BLOGGER_PHOTO_ID_5372979357192228386" border="0" /></a><br /></div><div>Click the Run button in the tool bar or choose menu Run > Run Main Project to see what is displayed when we Run the application with the default code.</div><div><br /></div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_fcQoj48LYPE/SpCoH5WkLKI/AAAAAAAABrQ/oA1qwqu8EbM/s1600-h/5.running-the-app.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 355px; height: 400px;" src="http://2.bp.blogspot.com/_fcQoj48LYPE/SpCoH5WkLKI/AAAAAAAABrQ/oA1qwqu8EbM/s400/5.running-the-app.png" alt="" id="BLOGGER_PHOTO_ID_5372979209061018786" border="0" /></a><br /></div><div>We can see that the generated project is a complete application which runs and shows a window with menu and status bar. To run the application outside NetBeans let us build the application. The current version of NetBeans IDE 6.7.1 compiles and builds the project automatically as you save the project. Let us invoke the menu Run > Clean and Build Main Project to see the build process and the message which is shown after a successful build. This message has a tip for us.</div><div><br /></div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fcQoj48LYPE/SpCoHHX0RmI/AAAAAAAABrI/UyHdlog7w9A/s1600-h/6.build-project.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 337px; height: 123px;" src="http://3.bp.blogspot.com/_fcQoj48LYPE/SpCoHHX0RmI/AAAAAAAABrI/UyHdlog7w9A/s400/6.build-project.png" alt="" id="BLOGGER_PHOTO_ID_5372979195644495458" border="0" /></a><br /></div><div>The build successful messages tells us the exact location where the application JAR file is kept. We can navigate to that folder through Explorer and double click the JAR file.</div><div><br /></div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_fcQoj48LYPE/SpCoGx30stI/AAAAAAAABrA/4O7iqY24uxA/s1600-h/7.location-of-jar.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 111px;" src="http://2.bp.blogspot.com/_fcQoj48LYPE/SpCoGx30stI/AAAAAAAABrA/4O7iqY24uxA/s400/7.location-of-jar.png" alt="" id="BLOGGER_PHOTO_ID_5372979189873160914" border="0" /></a><br /></div><div>The application is not dependant on NetBeans once it is build. Check the JAR file in the folder, in our case it is DesktopApplication1.jar.</div><div><br /></div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fcQoj48LYPE/SpCoGukWzcI/AAAAAAAABq4/1amxyBJMaxo/s1600-h/8.jar-in-explorer.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 221px;" src="http://3.bp.blogspot.com/_fcQoj48LYPE/SpCoGukWzcI/AAAAAAAABq4/1amxyBJMaxo/s400/8.jar-in-explorer.png" alt="" id="BLOGGER_PHOTO_ID_5372979188986203586" border="0" /></a><br /></div><div>When we double click this JAR file the application starts as if like a EXE file. Java is registered in windows registry as the handler of JAR files so when we double click the JAR file windows shell invokes Java Virtual Machine and hands this JAR file name over to it, so it can execute it for us.</div><div><br /></div><div><br /></div><div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_fcQoj48LYPE/SpCoGO_BFkI/AAAAAAAABqw/kk65qrS-NkE/s1600-h/9.double-click-app.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 325px; height: 400px;" src="http://4.bp.blogspot.com/_fcQoj48LYPE/SpCoGO_BFkI/AAAAAAAABqw/kk65qrS-NkE/s400/9.double-click-app.png" alt="" id="BLOGGER_PHOTO_ID_5372979180508091970" border="0" /></a><div><br /></div><div>Sometimes software like Nokia PC Suite adds JAR file handler entries in windows registry, in that case the JAR file may not run exactly as I have shown. If that happens just right click on the JAR file and choose Open With option. You will get all the application names registered to handle JAR files and choose Java in this menu to achieve the execution of JAR file.</div><div><br /></div><div>The JAR file created by NetBeans is executable because NetBeans adds a MANIFEST.MF file in the JAR with proper entry of the Main class of the project. </div><div><br /></div><div>with regards</div><div>Tushar Joshi, Nagpur</div></div></div>Tushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com40tag:blogger.com,1999:blog-4827130394695649251.post-62046125023125776732009-08-12T17:36:00.003+05:302009-08-12T17:43:49.857+05:30SHIFT+Click to close all Editor Tabs and ALT+Click to Close all othersTips covered in this post:<br /><ul><li>How to close all the editor tabs in NetBeans IDE?</li><li>How to close all other editor tabs except the current one in NetBeans IDE?</li><li>How to use mouse and keyboard combination for productivity in NetBeans IDE</li></ul><span style="font-weight: bold;">SHIFT+Click</span><br />When there are many editor tabs open in NetBeans IDE and we want to close them all, we have the keyboard shortcut of CTRL+SHIFT+W, but this can also be done using mouse and a single click. Just hold the SHIFT key and click on any of the editor tab close marks and wooooosh all the editor tabs will be closed.<br /><br /><span style="font-weight: bold;">ALT+Click (Option+Click in Mac)</span><br />When there are many editor tabs open and we want to keep only one tab open and close all the others in a single click, just hold the ALT button and click on the close button of the editor tab you want to keep open. This will close all the other editor tabs and only the one you clicked is retained.<br /><br />with regards<br />Tushar Joshi, NagpurTushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com1tag:blogger.com,1999:blog-4827130394695649251.post-49568974330987614922009-06-30T05:22:00.005+05:302009-06-30T05:30:49.920+05:30Download NetBeans IDE 6.7<div>NetBeans IDE 6.7 is out and available for download. The description as given in mailing list is as follows: </div><div><br /></div><div><a href="http://www.netbeans.org/downloads/index.html" target="_blank">Download NetBeans IDE 6.7</a></div><div><br /></div><div>The focus of NetBeans IDE 6.7 is connectivity—helping developers to connect to the latest technologies and to each other. New features include integration with Project Kenai, a collaborative environment for developers to host their open-source projects; native Maven support, and Hudson integration. </div><div><br /></div><div>Building on the success of previous releases, NetBeans IDE 6.7 offers enhancements for Java, PHP, Ruby, JavaScript, Groovy and C/C++, and more. Additional highlights include a self-diagnostic Profiler, and support for SVG Rich Components, remote debugging in Ruby, and the latest version of GlassFish. The release also provides plug-in support for Zembly, a single registry and repository for popular Web APIs. </div><div><br /></div><div>Providing superior support for multiple languages and innovative team support through Project Kenai, the NetBeans IDE 6.7 is the ideal tool for developers to stay connected to their teams and to the latest technologies! </div><div><br /></div><div>NetBeans IDE 6.7 is available in English, Brazilian Portuguese, Japanese and Simplified Chinese. There are several community-contributed localization efforts underway to support additional languages. <a href="http://translatedfiles.netbeans.org/">Join</a> the efforts today.</div><div><br /></div><div>More information about NetBeans IDE 6.7: </div><div><ul><li><a href="http://www.netbeans.org/features/index.html">NetBeans IDE 6.7 Features</a></li><li><a href="http://www.netbeans.org/kb/index.html">NetBeans IDE 6.7 Tutorials and Documentation</a></li><li><a href="http://www.netbeans.org/kb/docs/intro-screencasts.html">Videos of NetBeans IDE 6.7 in Action</a></li></ul></div><div>As always, we welcome and encourage <a href="http://www.netbeans.org/about/contact_form.html?to=2">feedback </a>about your experience using the NetBeans IDE. Share your thoughts on our <a href="http://www.netbeans.org/community/lists/top.html">mailing lists and forums</a>. If you blog about NetBeans add your blog to <a href="http://planetnetbeans.org/">Planet NetBeans</a>. Follow <a href="http://twitter.com/netbeans">NetBeans on Twitter</a> for updates about NetBeans news and development. </div><div><br /></div><div><b>NetBeans IDE Connects Developers!</b></div>Tushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com1tag:blogger.com,1999:blog-4827130394695649251.post-72404641075247617302009-02-20T02:04:00.007+05:302009-02-20T02:27:21.238+05:30Opening NetBeans projects and files from Linux File Browser<div><span class="Apple-style-span" style="font-weight: bold;">This post covers the topics as follows:</span></div><div><ul><li>How to add Open with NetBeans option in the Ubuntu (Nautilus) context menu?</li><li>How to open Projects and files from Linux File Browser (in our case Ubuntu Nautilus)?</li><li>How to use Netbeans IDE as a generic file editor?</li></ul></div><div>As described <a href="http://netbeanside61.blogspot.com/2009/02/open-with-netbeans-context-menu-in.html">in the earlier post</a> NetBeans IDE has a command line option --open which allows us to open any file and folder through command line in NetBeans IDE. Let us check how easy it is to add a context menu option on Linux for this technique.</div><div><br /></div><div><span class="Apple-style-span" style="font-weight: bold;">Adding Open with NetBeans context menu in Linux File Browser</span></div><div>We will open File Browser in Ubuntu which happens to be Nautilus application. We will navigate to the user home and on the folder icon we will right click to see the context menu. We will select the option "Open with Other Application..." option.</div><div><br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_fcQoj48LYPE/SZ3C4cF8agI/AAAAAAAABj0/3_EoNS6XUp8/s1600-h/ubuntu01.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 363px;" src="http://1.bp.blogspot.com/_fcQoj48LYPE/SZ3C4cF8agI/AAAAAAAABj0/3_EoNS6XUp8/s400/ubuntu01.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5304610210981898754" /></a><br /><div>Open With dialog box will be shown with the "Use a custom command" portion collapsed. We will click on this portion to get the expanded view of the dialog</div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_fcQoj48LYPE/SZ3C309VxbI/AAAAAAAABjs/xShFe1ZFK0A/s1600-h/ubuntu02.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 366px; height: 400px;" src="http://4.bp.blogspot.com/_fcQoj48LYPE/SZ3C309VxbI/AAAAAAAABjs/xShFe1ZFK0A/s400/ubuntu02.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5304610200476829106" /></a><br /></div><div>The expanded view of the Open With dialog will allow us to type the custom command, which in our case will be </div><div><br /></div><div class="mycode">/usr/local/netbeans-6.5/bin/netbeans --open</div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_fcQoj48LYPE/SZ3C3_GpolI/AAAAAAAABjk/oz3JRN-t-kg/s1600-h/ubuntu03.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 347px; height: 400px;" src="http://4.bp.blogspot.com/_fcQoj48LYPE/SZ3C3_GpolI/AAAAAAAABjk/oz3JRN-t-kg/s400/ubuntu03.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5304610203200234066" /></a><br /></div><div>The folder will get open in NetBeans IDE when we will press the Open button now. Not only this but now the option of Open with NetBeans will be added to the context menu for this user. We can check that by navigating to any folder which is a NetBeans project and right clicking it. Now we can see the Open with "netbeans" option in the context menu.</div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_fcQoj48LYPE/SZ3C3RUZC7I/AAAAAAAABjc/e6HlccQ-V2k/s1600-h/ubuntu04.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 272px;" src="http://2.bp.blogspot.com/_fcQoj48LYPE/SZ3C3RUZC7I/AAAAAAAABjc/e6HlccQ-V2k/s400/ubuntu04.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5304610190909836210" /></a><br /></div><div>This makes opening projects in NetBeans IDE a piece of cake. Not only projects but any folder can be open like this in NetBeans IDE using this context menu. If the folder is not a NetBeans Project it will get opened like a folder explorer panel which is very handy to work with files. See how the opened project looks like when opened through this context menu.</div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fcQoj48LYPE/SZ3Ck7wYKyI/AAAAAAAABjU/tMZmgohbTbw/s1600-h/ubuntu05.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 301px;" src="http://3.bp.blogspot.com/_fcQoj48LYPE/SZ3Ck7wYKyI/AAAAAAAABjU/tMZmgohbTbw/s400/ubuntu05.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5304609875883993890" /></a><br /></div><div><span class="Apple-style-span" style="font-weight: bold;">Opening files using context menu in File Browser in Linux</span></div><div>Using the same technique we can also add a context menu for files. Let us right click a file and select the "Open with other Application..." option from the context menu.</div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_fcQoj48LYPE/SZ3CkoDrruI/AAAAAAAABjM/jdjOS-Sdkws/s1600-h/ubuntu06.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 328px;" src="http://1.bp.blogspot.com/_fcQoj48LYPE/SZ3CkoDrruI/AAAAAAAABjM/jdjOS-Sdkws/s400/ubuntu06.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5304609870596255458" /></a><br /></div><div>Again the Open With dialog will pop up. We will type the same custom command here also.</div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_fcQoj48LYPE/SZ3CkvNeSQI/AAAAAAAABjE/mAfcQ4Gqs_I/s1600-h/ubuntu07.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 341px; height: 400px;" src="http://4.bp.blogspot.com/_fcQoj48LYPE/SZ3CkvNeSQI/AAAAAAAABjE/mAfcQ4Gqs_I/s400/ubuntu07.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5304609872516368642" /></a><br /></div><div>Now the context menu for files is ready to use. Let us right click on any file and we get a Open With sub menu, which has many options including the Open with "netbeans" option also. Now we can use this context menu option to open literally any file from the File Browser.</div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_fcQoj48LYPE/SZ3CkWosOyI/AAAAAAAABi8/D3eqDCUuXTc/s1600-h/ubuntu08.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 211px;" src="http://1.bp.blogspot.com/_fcQoj48LYPE/SZ3CkWosOyI/AAAAAAAABi8/D3eqDCUuXTc/s400/ubuntu08.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5304609865919642402" /></a><br /></div><div>When a file is opened like this NetBeans IDE provides all the syntax highlighting features for the file type. This makes NetBeans IDE a general purpose editor for any file.</div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fcQoj48LYPE/SZ3CkUK2UmI/AAAAAAAABi0/Jl4aD9Bf-Xg/s1600-h/ubuntu09.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 297px;" src="http://3.bp.blogspot.com/_fcQoj48LYPE/SZ3CkUK2UmI/AAAAAAAABi0/Jl4aD9Bf-Xg/s400/ubuntu09.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5304609865257603682" /></a><br /></div><div>I also tried to run a simple Java file opened like this in NetBeans IDE and it executed and displayed the output on the output window.</div><div><br /></div><div>with regards</div><div>Tushar Joshi, Nagpur</div>Tushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com4tag:blogger.com,1999:blog-4827130394695649251.post-77836176999590778692009-02-19T23:47:00.004+05:302011-07-12T12:54:23.426+05:30Open with NetBeans context menu in Windows<div><div><span class="Apple-style-span" style="font-weight: bold;">This post covers the following topics:</span></div><div><ul><li>How to add Open with NetBeans to windows file and folder context menu<br />
</li>
<li>How to open any file in NetBeans without creating a project<br />
</li>
<li>How to use NetBeans IDE as a file and folder explorer<br />
</li>
<li>How to use the --open command line option for NetBeans IDE<br />
</li>
</ul></div><div><br />
</div><div><span class="Apple-style-span" style="font-weight: bold;">--open command line option for NetBeans IDE</span></div><div>NetBeans IDE identified --open command line option and opens the file or folder given as an argument after this command line option. This fact makes the NetBeans IDE useful to open any file and folder through command line. In windows we can use this feature to introduce a context menu for files and folders in Explorer by tweaking the Windows Registry.</div><div><br />
</div><div><span class="Apple-style-span" style="font-weight: bold;">Adding Open with NetBeans option to windows context menu</span></div><div>In windows we can add two extries to the Windows Registry to add Open with NetBeans option to the Windows Explorer context menu. These entries need absolute path of the NetBeans IDE executable so while trying this trick please check the NetBeans IDE executable path.</div><div><br />
</div><div>My NetBeans IDE 6.5 executable path is</div><div><br />
</div><div class="mycode">C:\Program Files\NetBeans 6.5\bin\netbeans.exe</div><div><br />
</div><div>We can add the registry entries manually by opening the regedit.exe application from the Start > Run menu, or we can create a REG file to achieve this. Creating the REG file is the easiest option. We will create a file with name openwithnetbeans.reg and we will copy the following contents in that file. Double clicking this REG file will add these registry entries to the Windows registry as required.</div><div><br />
</div><div class="mycode"><br />
Windows Registry Editor Version 5.00<br />
<br />
[HKEY_CLASSES_ROOT\*\shell\Open with NetBeans\command]<br />
@="\"C:\\Program Files\\NetBeans 6.5\\bin\\netbeans.exe\" --open \"%1\""<br />
<br />
[HKEY_CLASSES_ROOT\Folder\shell\Open with NetBeans\command]<br />
@="\"C:\\Program Files\\NetBeans 6.5\\bin\\netbeans.exe\" --open \"%1\""</div><div><br />
</div><div>Now when we open the Explorer and right click on a NetBeans project folder we get option as Open with NetBeans and clicking on this option will start the NetBeans IDE and will open this project in the IDE.</div></div><div><br />
</div><br />
<a href="http://1.bp.blogspot.com/_fcQoj48LYPE/SZ2il5SKDOI/AAAAAAAABik/UwCowcslEKo/s1600-h/genedit01.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5304574708028148962" src="http://1.bp.blogspot.com/_fcQoj48LYPE/SZ2il5SKDOI/AAAAAAAABik/UwCowcslEKo/s400/genedit01.jpg" style="cursor: hand; cursor: pointer; display: block; height: 319px; margin: 0px auto 10px; text-align: center; width: 400px;" /></a><br />
<div>We can see the project open in the NetBeans IDE for us.<br />
<br />
<br />
<img alt="" border="0" id="BLOGGER_PHOTO_ID_5304574707245285986" src="http://3.bp.blogspot.com/_fcQoj48LYPE/SZ2il2XggmI/AAAAAAAABis/MpSFn77Zowk/s400/genedit02.jpg" style="cursor: hand; cursor: pointer; display: block; height: 268px; margin: 0px auto 10px; text-align: center; width: 400px;" /></div><div style="text-align: center;"><br />
</div><div style="text-align: left;"><div style="text-align: left;">When NetBeans IDE is already open this command will open the project in the existing IDE. </div><div style="text-align: left;"><br />
</div><div style="text-align: left;"><span class="Apple-style-span" style="font-weight: bold;">Opening any file in NetBeans IDE from Windows Explorer</span></div><div style="text-align: left;">Now when we right click on any file in the Windows Explorer we get the same option of Open with NetBeans and the file gets open in the existing NetBeans IDE or if it is not open a new one is started for us.</div><div style="text-align: left;"><br />
</div><div style="text-align: left;">This makes NetBeans IDE a general purpose editor for me to edit any file in my computer. </div><div style="text-align: left;"><br />
</div><div style="text-align: left;">with regards</div><div style="text-align: left;">Tushar Joshi, Nagpur</div></div>Tushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com8tag:blogger.com,1999:blog-4827130394695649251.post-70939280179532448122009-02-17T22:07:00.006+05:302014-03-22T00:55:35.676+05:30Using Command Line Arguments in NetBeans IDE<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<div>
This post covers the following points:</div>
<div>
<ul>
<li>How to open the project properties dialog box for NetBeans IDE projects?</li>
<li>How to use command line arguments while running programs through NetBeans IDE?</li>
</ul>
<div>
<div>
NetBeans IDE provides a way to invoke our Java program having a main method with command line arguments. Let us walk through this process. We will create a new Java Application project and will add some code to the Main method which will print the provided command line arguments on the console.</div>
<div>
<br /></div>
<div>
Test Code we have written in the Main method:</div>
<div>
<br /></div>
<br />
<div class="mycode">
<br />
/*<br />
* To change this template, choose Tools | Templates<br />
* and open the template in the editor.<br />
*/<br />
package com.tusharvjoshi.argsdemo;<br />
<br />
/**<br />
*<br />
* @author Tushar Joshi <tusharvjoshi gmail.com=""><br /> */<br />public class Main {<br /><br /> /**<br /> * @param args the command line arguments<br /> */<br /> public static void main(String[] args) {<br /> if (args.length == 0) {<br /><br /> System.out.println("No Command Line arguments");<br /> <br /> } else {<br /><br /> System.out.println("You provided " + args.length <br /> + " arguments");<br /><br /> for (int i = 0; i < args.length; i++) {<br /> System.out.println("args[" + i + "]: "<br /> + args[i]);<br /> }<br /> }<br /> }<br />}<br /></tusharvjoshi></div>
<br />
<div>
<br /></div>
<div>
Opening the project properties dialog boxWe can either right click on the project name in the Projects panel and choose the properties option, or we can choose the Project Properties option from the File menu.</div>
<div>
<br /></div>
</div>
</div>
</div>
<div>
<br /></div>
<div>
<img alt="" border="0" src="http://3.bp.blogspot.com/_fcQoj48LYPE/SZro2l-Ut_I/AAAAAAAABic/G-hcosNoqDw/s400/args01.jpg" id="BLOGGER_PHOTO_ID_5303807535786276850" style="cursor: hand; cursor: pointer; display: block; height: 381px; margin: 0px auto 10px; text-align: center; width: 288px;" /></div>
<div>
Saving the command line arguments</div>
<div>
<br /></div>
<div>
In the project Properties dialog box we will have to choose the Run node from the left Categories tree. As soon as we select the Run node we can see the options for the run configuration.</div>
<div>
<br /></div>
<div>
In the Arguments text box we have to type our command line arguments. We can see we have typed "one two three" as the options in the dialog box for testing.</div>
<div>
<br />
<a href="http://3.bp.blogspot.com/_fcQoj48LYPE/SZro2RfFbmI/AAAAAAAABiU/Mwc3FCXrx38/s1600-h/args02.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" src="http://3.bp.blogspot.com/_fcQoj48LYPE/SZro2RfFbmI/AAAAAAAABiU/Mwc3FCXrx38/s400/args02.jpg" id="BLOGGER_PHOTO_ID_5303807530286542434" style="cursor: hand; cursor: pointer; display: block; height: 210px; margin: 0px auto 10px; text-align: center; width: 400px;" /></a></div>
<div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
Now when we Run the project the project will run as if these command line arguments are being typed in front of the java command. We can see the output window to check how the arguments are printed by our test code.</div>
<br />
<a href="http://2.bp.blogspot.com/_fcQoj48LYPE/SZro2SiAsVI/AAAAAAAABiM/FAQj3bKyBP0/s1600-h/args03.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" src="http://2.bp.blogspot.com/_fcQoj48LYPE/SZro2SiAsVI/AAAAAAAABiM/FAQj3bKyBP0/s400/args03.jpg" id="BLOGGER_PHOTO_ID_5303807530567250258" style="cursor: hand; cursor: pointer; display: block; height: 166px; margin: 0px auto 10px; text-align: center; width: 395px;" /></a></div>
<div>
with regards</div>
<div>
Tushar Joshi, Nagpur<br />
<br />
<b>UPDATE: 21 Mar 2014:</b><br />
There is a plugin available for NetBeans IDE 8.0 which allows interactive command line arguments facility to the IDE, more <a href="http://netbeanside61.blogspot.in/2014/03/command-line-arguments-for-java.html" target="_blank">details are in this post</a> <br />
<div>
<code here=""></code><br />
<div>
<code here=""><br /></code></div>
</div>
<code here=""></code></div>
</div>
Tushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com52tag:blogger.com,1999:blog-4827130394695649251.post-53824636000561285472009-02-02T18:48:00.003+05:302009-02-02T18:56:01.871+05:30NetBeans Voice of Community Process (VOC)<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_fcQoj48LYPE/SYbymVWEb9I/AAAAAAAABhk/4kZkLgzc-Zo/s1600-h/microphone_full.jpeg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 264px; height: 400px;" src="http://2.bp.blogspot.com/_fcQoj48LYPE/SYbymVWEb9I/AAAAAAAABhk/4kZkLgzc-Zo/s400/microphone_full.jpeg" border="0" alt="" id="BLOGGER_PHOTO_ID_5298188752026628050" /></a><br /><div><div>NetBeans is growing day by day as a IDE as well as a platform for RCP. There is considerable volume of community attached with the NetBeans development and looking forward for the new features getting inroduced and also to the issues they face with the NetBeans IDE.<br /></div><div><br /></div><div><span class="Apple-style-span" style="font-weight: bold;">Feedback from Community</span></div><div>Community has many ways to manifest their feedback in the current Web2.0 age. They write blogs, they write twitter messages, they write forum posts, they file bugs and request for enhancements in the NetBeans IssuZilla. They write mails in the mailing lists like nbusers nbdev and openide. </div><div><br /></div><div><span class="Apple-style-span" style="font-weight: bold;">One more effort to listen:</span></div><div>It is thought that increasing overall satisfaction with NetBeans will support Word of Mouth adoption of the IDE which will support further growth of NetBeans userbase. That's why we needed a coordinated process whose primary motivation is to fix issues not only show that we care.</div><div><br /></div><div><span class="Apple-style-span" style="font-weight: bold;">What is VOC?</span></div><div><a href="http://wiki.netbeans.org/VoiceOfCommunity">NetBeans Voice of Community process</a> is started keeping this in mind and it is a team of 3 community members and one representative from Sun. Along with me the other two community members who are now called as VOC Captains are <a href="mailto:melongo_annabel@yahoo.com">Annabel Melongo</a> and <a href="http://wiki.netbeans.org/MichelGraciano">Michel Graciano</a>. The Sun representative is <a href="mailto:jiri.kovalsky@sun.com">Jiri Kovalsky</a>.</div><div><br /></div><div><span class="Apple-style-span" style="font-weight: bold;">How VOC will work?</span></div><div>Channels are identified to gather feedback like <a href="mailto:nbusers@netbeans.org">nbusers@netbeans.org</a> mailing list, netbeans chat, blogs, forums like <a href="http://www.dzone.com/">DZone</a>, <a href="http://www.theserverside.com/">TheServerSide</a>. So as soon as we find a issue or feedback which has BIG impact on NetBeans and where we know the reported of the issue and when the issue is reproducible we will register that issue as VOC issue and it will be given priority by the development team in the process of development of NetBeans.</div><div><br /></div><div><span class="Apple-style-span" style="font-weight: bold;">How to send feedback directly to VOC?</span></div><div>Community members and NetBeans users can directly send their feedback to the VOC mailing list at <a href="mailto:voc@netbeans.org">voc@netbeans.org</a> No subscription to the mailing list is needed to send the feedback.</div><div><br /></div><div><span class="Apple-style-span" style="font-weight: bold;">References:</span></div><div>VOC Page</div><div><a href="http://wiki.netbeans.org/VoiceOfCommunity">http://wiki.netbeans.org/VoiceOfCommunity</a></div><div><br /></div><div>with regards</div><div>Tushar Joshi, Nagpur</div><div><br /></div></div>Tushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com0tag:blogger.com,1999:blog-4827130394695649251.post-11967335723843851162008-12-29T02:35:00.005+05:302008-12-29T03:15:32.029+05:30Opening multiple NetBeans IDE instances simultaneously<div><div>Main concepts in this post:<br /></div><div><ul><li>--userdir NetBeans command line switch<br /></li><li>opening multiple instances of NetBeans IDE<br /></li><li>Netbeans about dialog box<br /></li></ul></div><div><br /></div><div>This post answers questions like:</div><div><ul><li>How to open two NetBeans IDE simulteneously?<br /></li><li>What is NetBeans user directory?<br /></li><li>What is the --userdir NetBeans command line switch?<br /></li><li>How to know the current user directory of NetBeans?<br /></li><li>How to use same NetBeans installation to open two instances?<br /></li></ul></div><div><br /></div><div>Many a times we need to look two projects at the same time in NetBeans IDE. If both the projects are open in two seperate NetBeans IDEs that will be easier to look into one IDE instance having one project and code into the other instance of the IDE for the other project.</div></div><div><br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_fcQoj48LYPE/SVfsmq6GdkI/AAAAAAAABgU/JytAYNKXzWI/s1600-h/01.+multiple01.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 396px;" src="http://2.bp.blogspot.com/_fcQoj48LYPE/SVfsmq6GdkI/AAAAAAAABgU/JytAYNKXzWI/s400/01.+multiple01.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5284952836839732802" /></a><br /><div>The NetBeans IDE maintains one user directory for one instance. The trick is to make seperate user directories and make shortcuts of NetBeans IDE to start the instances in those seperate user directories. Through these shortcuts we can pass the instruction to the IDE about what user directory to choose while running the instance.<br /></div><div><br /></div><div><div>Let us take an example. We will create two directories</div><div><br /></div><div class="mycode">1. D:\nbuserdir1 </div><div><br /></div><div>and</div><div><br /></div><div class="mycode">2. D:\nbuserdir2</div><div><br /></div><div>Now we will create two shortcuts on the desktop which can be done by copying the NetBeans shortcut in the start menu and making two copies with dufferent names. Now we will right click on the shortcuts and will choose the properties. Then we will change the execution path and add the additional part to that command as<br /></div></div><div><br /></div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_fcQoj48LYPE/SVfsmaUeJeI/AAAAAAAABgM/a3zcUXz73xc/s1600-h/02.+copying-shortcut.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 242px; height: 200px;" src="http://1.bp.blogspot.com/_fcQoj48LYPE/SVfsmaUeJeI/AAAAAAAABgM/a3zcUXz73xc/s400/02.+copying-shortcut.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5284952832386934242" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_fcQoj48LYPE/SVfsmNDAPoI/AAAAAAAABgE/0k7UzrVI82o/s1600-h/03.+properties-dlg.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 363px; height: 400px;" src="http://2.bp.blogspot.com/_fcQoj48LYPE/SVfsmNDAPoI/AAAAAAAABgE/0k7UzrVI82o/s400/03.+properties-dlg.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5284952828824010370" /></a><br /></div><div><div class="mycode"><netbeanscommand> --userdir D:\nbuserdir1 for the first shortcut </div><div><br /></div><div>and</div><div><br /></div><div class="mycode"><netbeanscommand> --userdir D:\nbuserdir2 for the second shortcut.<br /></div></div><div><br /></div><div><br /></div><div>Now we are ready to execute the NetBeans IDE in two instances. When we double click on those instances we will have two seperate IDEs running simulteneously.</div><div><br /></div><div>To check which user directory is currently used by the running IDE we can open the Help > About diablog box. This dialog box will also show us the user directory used by the running instance.</div><div> <br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_fcQoj48LYPE/SVfslrg4UoI/AAAAAAAABf8/SDHunZcXBNw/s1600-h/04.+help-about-menu.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 203px; height: 240px;" src="http://4.bp.blogspot.com/_fcQoj48LYPE/SVfslrg4UoI/AAAAAAAABf8/SDHunZcXBNw/s400/04.+help-about-menu.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5284952819822514818" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_fcQoj48LYPE/SVfslUWe9-I/AAAAAAAABf0/ZfxWkj7ZJnM/s1600-h/05.+nb-about-dlg.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 383px; height: 400px;" src="http://1.bp.blogspot.com/_fcQoj48LYPE/SVfslUWe9-I/AAAAAAAABf0/ZfxWkj7ZJnM/s400/05.+nb-about-dlg.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5284952813604894690" /></a><br /><div><div>with regards</div><div>Tushar Joshi, Nagpur</div></div></div>Tushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com28tag:blogger.com,1999:blog-4827130394695649251.post-29068882772349981842008-12-16T04:45:00.003+05:302008-12-16T04:56:46.338+05:30Annoyed about NetBeans IDE<div><a href="http://tastyimportant.blogspot.com/2008/12/netbeans-heheheh.html">Danny Nieuwegein</a> from Netherlands is <span class="Apple-style-span" style="font-weight: bold; "><a href="http://tastyimportant.blogspot.com/2008/12/netbeans-heheheh.html">annoyed </a></span>about NetBeans IDE and the most annoying thing in NetBeans IDE as he mentions, in his blog is, CTRL-F4 closing not only the code windows, but also the project window! and when he cleans up his screen by holding CTRL-F4, all the windows including project windows gets closed and then he need to track down the option to turn the project window back on!<br /></div><div><div><br /></div><div>I tried what he is saying and indeed the CTRL+F4 keyboard shortcut closes one window at a time in NetBeans IDE and ultimately you get just the main window.</div><div><br /></div></div><div><div>I think Danny wants a way to close only the editor windows. I tried to find out how to do that by right clicking an editor window.</div><div><br /></div></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_fcQoj48LYPE/SUbnIVwrHCI/AAAAAAAABes/9zqkSLgKQvY/s1600-h/close-windows01.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 251px;" src="http://1.bp.blogspot.com/_fcQoj48LYPE/SUbnIVwrHCI/AAAAAAAABes/9zqkSLgKQvY/s400/close-windows01.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5280161743604751394" /></a><br /><div><div>I go the keyboard shortcut for closing all the editor windows as <span class="Apple-style-span" style="font-weight: bold;">CTRL + SHIFT + W</span> and it worked. So now atleast this cannot be a reason to get annoyed with NetBeans IDE and we can use this keyboard shortcut to close just the editor windows.</div><div><br /></div><div>With Regards</div><div>Tushar Joshi, Nagpur</div></div>Tushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com2tag:blogger.com,1999:blog-4827130394695649251.post-40811877773514744742008-12-10T09:42:00.006+05:302008-12-14T07:15:15.500+05:30Adding MIT license in Java Class as Header<div>For our open source project jcompare we are using MIT license. According to the open source tradition we wanted the MIT license to be included in our source code files. NetBeans makes the inclusion of license piece of cake through the templates feature.</div><div><br /></div><div>We will use the Tools Menu and Templates option</div><div><br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_fcQoj48LYPE/ST9ChLnmJUI/AAAAAAAABeA/tJf8TS5ceXE/s1600-h/license01.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 156px; height: 400px;" src="http://4.bp.blogspot.com/_fcQoj48LYPE/ST9ChLnmJUI/AAAAAAAABeA/tJf8TS5ceXE/s400/license01.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5278010426123494722" /></a><br /><div>In the various categories we have to select the Licenses Node. We need MIT license to be listed there. Initially there are only two entries under the Licenses node. NetBeans CDDL and Default License. The best way to create another license is select existing license and press the Duplicate button.</div><div><br /></div><div>Let us press the duplicate button and we get a new License entry. Important thing to note here is the license name shall be exactly as license-MIT.txt </div><div><br /></div><div>This will ensure we can use the default Java Class template as it is. Now we will select that entry license-MIT.txt and press the Open in folder button to open this file. We will have to change this file with our <a href="http://www.opensource.org/licenses/mit-license.php">MIT license text</a> which we will get from <a href="http://www.opensource.org/licenses/mit-license.php">OSI site</a>.</div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_fcQoj48LYPE/ST9B0ufKfyI/AAAAAAAABd4/RdJfFH9_taU/s1600-h/license02.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 302px;" src="http://2.bp.blogspot.com/_fcQoj48LYPE/ST9B0ufKfyI/AAAAAAAABd4/RdJfFH9_taU/s400/license02.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5278009662389255970" /></a><br /></div><div class="mycode"><br /><#if licenseFirst??><br />${licenseFirst}<br /><br />${licensePrefix}Copyright (c) <year> <copyright holders=""><br />${licensePrefix}<br />${licensePrefix}Permission is hereby granted, free of charge, to any person obtaining a copy<br />${licensePrefix}of this software and associated documentation files (the "Software"), to deal<br />${licensePrefix}in the Software without restriction, including without limitation the rights<br />${licensePrefix}to use, copy, modify, merge, publish, distribute, sublicense, and/or sell<br />${licensePrefix}copies of the Software, and to permit persons to whom the Software is<br />${licensePrefix}furnished to do so, subject to the following conditions:<br />${licensePrefix}<br />${licensePrefix}The above copyright notice and this permission notice shall be included in<br />${licensePrefix}all copies or substantial portions of the Software.<br />${licensePrefix}<br />${licensePrefix}THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br />${licensePrefix}IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br />${licensePrefix}FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE<br />${licensePrefix}AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br />${licensePrefix}LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,<br />${licensePrefix}OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN<br />${licensePrefix}THE SOFTWARE.<br /><#if licenseLast??><br />${licenseLast}<br /><br /></copyright></year></div><div><br /></div><div>Next step we will follow is to open the project.properties file. We will navigate to the Files panel and expand the nbproject folder to see this file and double click on it to open it in editor.</div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_fcQoj48LYPE/ST9B0sBAOeI/AAAAAAAABdw/Bz8aUY0UeDc/s1600-h/license03.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 291px; height: 313px;" src="http://4.bp.blogspot.com/_fcQoj48LYPE/ST9B0sBAOeI/AAAAAAAABdw/Bz8aUY0UeDc/s400/license03.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5278009661725882850" /></a><br /></div><div>We will add a new property in this file at the end.</div><div>That property will be</div><div><br /></div><div class="mycode">project.license=MIT</div><div><br /></div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_fcQoj48LYPE/ST9B0YUS_oI/AAAAAAAABdo/f6ZjwuxfpX0/s1600-h/license04.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 230px; height: 400px;" src="http://1.bp.blogspot.com/_fcQoj48LYPE/ST9B0YUS_oI/AAAAAAAABdo/f6ZjwuxfpX0/s400/license04.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5278009656438095490" /></a><br /></div><div>Now when we create a new class in our project the license text will be included as required.</div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fcQoj48LYPE/ST9Bzy4GRYI/AAAAAAAABdg/i8lUPp3w8r0/s1600-h/license05.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 366px;" src="http://3.bp.blogspot.com/_fcQoj48LYPE/ST9Bzy4GRYI/AAAAAAAABdg/i8lUPp3w8r0/s400/license05.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5278009646387709314" /></a><br /></div><div>The license file gets created in the config\Templates folder of the NetBeans user directory as shown in the image below:</div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_fcQoj48LYPE/ST9BzjD8ZeI/AAAAAAAABdY/mG-f4OlDbM8/s1600-h/license06.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 341px; height: 136px;" src="http://4.bp.blogspot.com/_fcQoj48LYPE/ST9BzjD8ZeI/AAAAAAAABdY/mG-f4OlDbM8/s400/license06.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5278009642142426594" /></a>with regards<div>Tushar Joshi, Nagpur</div><div><br /></div><div>References:</div><div><a href="http://blogs.sun.com/geertjan/entry/project_level_license_settings_in">Project-Level License Settings in NetBeans IDE 6.0 - Geertjan's Blog</a><br /></div><div><a href="http://javaevangelist.blogspot.com/2008/08/netbeans-license-templates.html">UPDATE: NetBeans License Templates - John Yeary</a> - John has more templates for licenses</div></div>Tushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com1tag:blogger.com,1999:blog-4827130394695649251.post-63933552309707827302008-12-10T08:41:00.006+05:302008-12-10T09:03:35.057+05:30Real @author name in java classes<div>When we create a new class in NetBeans the class is created using the default template for a Java class and this template uses the user name which is created as the computer user. In my case it is tusharj. This makes the class use my name as</div><div><br /></div><br /><div class="mycode">@author tusharj</div><br /><br /><div><br /></div><div>which is not exciting. I want to use my real name and my email address after the @author java doc tag.</div><div><br /></div><div>NetBeans provides a way to specify your own name to be used here. Open the Tools Menu and choose the Templates option.</div><div><br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_fcQoj48LYPE/ST8z2g4m4JI/AAAAAAAABdQ/vLZmGugucdQ/s1600-h/username01.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 156px; height: 400px;" src="http://2.bp.blogspot.com/_fcQoj48LYPE/ST8z2g4m4JI/AAAAAAAABdQ/vLZmGugucdQ/s400/username01.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5277994299934826642" /></a>In the long list of Templates locate the User Configuration Properties Node and select its child node User.properties<div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fcQoj48LYPE/ST8z2djQVuI/AAAAAAAABdI/rhTIcJiBYMg/s1600-h/username02.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 302px;" src="http://3.bp.blogspot.com/_fcQoj48LYPE/ST8z2djQVuI/AAAAAAAABdI/rhTIcJiBYMg/s400/username02.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5277994299039962850" /></a><br /></div><div>Uncomment the #user line and add your name and email address. Check the name I have written for me in the image below.</div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_fcQoj48LYPE/ST8z1x7FwYI/AAAAAAAABdA/J-0WR55K8kQ/s1600-h/username03.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 119px;" src="http://2.bp.blogspot.com/_fcQoj48LYPE/ST8z1x7FwYI/AAAAAAAABdA/J-0WR55K8kQ/s400/username03.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5277994287328772482" /></a><br /></div><div>Now when we create a new Java class </div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_fcQoj48LYPE/ST8z1mKKYHI/AAAAAAAABc4/8ZgsaCEn22k/s1600-h/username04.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 313px;" src="http://2.bp.blogspot.com/_fcQoj48LYPE/ST8z1mKKYHI/AAAAAAAABc4/8ZgsaCEn22k/s400/username04.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5277994284170764402" /></a><br /></div><div>We can see the @author tag with my real name </div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_fcQoj48LYPE/ST8z1jCnR3I/AAAAAAAABcw/bW8jPBzHHBY/s1600-h/username05.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 266px;" src="http://3.bp.blogspot.com/_fcQoj48LYPE/ST8z1jCnR3I/AAAAAAAABcw/bW8jPBzHHBY/s400/username05.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5277994283333797746" /></a>with regards</div><div>Tushar Joshi, Nagpur</div>Tushar Joshihttp://www.blogger.com/profile/03931011991029693685noreply@blogger.com8