<?xml version="1.0"?>
<rss version="2.0">
<channel>
  <title>Weiqi Gao&#039;s Observations - netbeans tag</title>
  <link>http://www.weiqigao.com/blog/tags/netbeans/</link>
  <description>Sharing My Experience...</description>
  <language>en</language>
  <copyright>Weiqi Gao</copyright>
  <lastBuildDate>Fri, 11 May 2012 12:48:36 GMT</lastBuildDate>
  <generator>Pebble (http://pebble.sourceforge.net)</generator>
  <docs>http://backend.userland.com/rss</docs>
  
  <image>
    <url>http://pebble.sourceforge.net/common/images/powered-by-pebble.gif</url>
    <title>Weiqi Gao&#039;s Observations</title>
    <link>http://www.weiqigao.com/blog/</link>
  </image>
  
  
  <item>
    <title>JavaFX 1.0 On Linux: NetBeans Plugin</title>
    <link>http://www.weiqigao.com/blog/2008/12/11/javafx_1_0_on_linux_netbeans_plugin.html</link>
    
      
        <description>
          &lt;p&gt;[&lt;b&gt;Update&lt;/b&gt; (Wed Jun  3 07:45:43 PDT 2009)]: As of June 2, 2009, you can download the Linux and Solaris version of JavaFX 1.2 SDK directly from &lt;a href= &#034;http://javafx.com&#034; &gt;http://javafx.com&lt;/a&gt;.  The Linux and Solaris support is preview only.[&lt;b&gt;/&lt;/b&gt;]&lt;/p&gt;

&lt;p&gt;This is a follow up on my &lt;a href= &#034;http://www.weiqigao.com/blog/2008/12/04/using_javafx_1_0_on_linux.html&#034; &gt;Using JavaFX 1.0 On Linux&lt;/a&gt; seven days ago.&lt;/p&gt;

&lt;p&gt;That blog entry was picked up by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href= &#034;http://learnjavafx.typepad.com/weblog/2008/12/a-word-from-josh-marinacci-of-sun-about-javafx-sdk-10-linux-and-solaris-support.html&#034; &gt;James Weaver’s JavaFX Blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href= &#034;http://silveiraneto.net/2008/12/06/javafx-sdk-10-on-linux/&#034; &gt;Silveira Neto.net (Includes YouTube video)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href= &#034;http://java.dzone.com/news/javafx-10-linux-netbeans-ide&#034; &gt;JavaLobby (Geertjan Wielenga)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A commenter on my blog (and several commenters on the above cited blogs) asked about if the JavaFX NetBeans plugin can be made to work on Linux.  Sure it can.  It&#039;s Java.&lt;/p&gt;

&lt;p&gt;However, since the plugin is not officially released for Linux, things are a little bit confusing: If you browse for &lt;i&gt;Available Plugins&lt;/i&gt; and search for javafx, you will see three plugins:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JavaFX Source Debug&lt;/li&gt;
&lt;li&gt;JavaFX 1.0&lt;/li&gt;
&lt;li&gt;JavaFX Weather Sample&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;but they cannot be installed.  The error message reads:&lt;/p&gt;

&lt;pre style=&#034;margin-left:3em&#034;&gt;No plugin providing the capability javafx.sdk could be found.&lt;/pre&gt;

&lt;p&gt;These three are leftovers from the JavaFX Preview SDK release.  We do not want them.  We need to browse to the NetBeans update center to find the ones we want:&lt;/p&gt;

&lt;p style=&#034;margin-left:3em&#034;&gt;&lt;a href= &#034;http://updates.netbeans.org/netbeans/updates/6.5/uc/final/stable/modules/javafx/&#034; &gt;http://updates.netbeans.org/netbeans/updates/6.5/uc/final/stable/modules/javafx/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It contains 23 &lt;tt&gt;*.nbm&lt;/tt&gt; (Netbeans module) files.  Download them all into a directory.&lt;/p&gt;

&lt;p&gt;In NetBeans plugin manager, go to the &lt;i&gt;Downloaded&lt;/i&gt; tab and click on the &lt;i&gt;Add Plugins...&lt;/i&gt; button, and add all the downloaded files.  You will see 21 plugins showing up in the window.  Now &lt;b&gt;*uncheck*&lt;/b&gt; the three JavaFX Preview SDK plugins listed above and install the rest 18.  The installation should go normally, prompting you to restart Netbeans.&lt;/p&gt;

&lt;p&gt;The two &lt;tt&gt;*.nbm&lt;/tt&gt; files that the NetBeans plugin manager did not show contains the Windows and Mac versions of the JavaFX SDK 1.0.  We ignore the Windows file and concentrate on the Mac version.  We do a manual installation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unzip the file (It&#039;s a Zip formatted file)&lt;/li&gt;
&lt;li&gt;This generated a few subdirectories, one of them is &lt;tt style=&#034;color:blue&#034;&gt;netbeans&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;The &lt;tt style=&#034;color:blue&#034;&gt;netbeans&lt;/tt&gt; directory further contains subdirectories &lt;tt style=&#034;color:blue&#034;&gt;config&lt;/tt&gt;, &lt;tt style=&#034;color:blue&#034;&gt;javafx-sdk1.0&lt;/tt&gt; and &lt;tt style=&#034;color:blue&#034;&gt;modules&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;In your NetBeans 6.5 installation directory, create a subdirectory &lt;tt style=&#034;color:blue&#034;&gt;javafx2&lt;/tt&gt; (in parallel to the &lt;tt style=&#034;color:blue&#034;&gt;java2&lt;/tt&gt;, &lt;tt style=&#034;color:blue&#034;&gt;groovy1&lt;/tt&gt; and &lt;tt style=&#034;color:blue&#034;&gt;ruby2&lt;/tt&gt; subdirectories) and copy the &lt;tt style=&#034;color:blue&#034;&gt;config&lt;/tt&gt;, &lt;tt style=&#034;color:blue&#034;&gt;javafs-sdk1.0&lt;/tt&gt; and &lt;tt style=&#034;color:blue&#034;&gt;modules&lt;/tt&gt; directories into &lt;tt style=&#034;color:blue&#034;&gt;javafx2&lt;/tt&gt;.&lt;/li&gt;
&lt;li&gt;You may need to go into the &lt;tt style=&#034;color:blue&#034;&gt;javafx-sdk1.0/bin&lt;/tt&gt; subdirectory and make the scripts there executable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That&#039;s it.  You now can create JavaFX projects in NetBeans 6.5, edit, compile, debug and preview the project.&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

&lt;p&gt;Or wait for the official Linux release, which is only (I heard it somewhere) weeks away.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Disclaimer: I know very little about NetBeans modules.  Although the above procedure appears to work for me, I&#039;m not sure if there is a shorter way to do all this, or if it will have any negative effects on your NetBeans installation.  YMMV.)&lt;/em&gt;&lt;/p&gt;
        </description>
      
      
    
    
    
    <comments>http://www.weiqigao.com/blog/2008/12/11/javafx_1_0_on_linux_netbeans_plugin.html#comments</comments>
    <guid isPermaLink="true">http://www.weiqigao.com/blog/2008/12/11/javafx_1_0_on_linux_netbeans_plugin.html</guid>
    <pubDate>Thu, 11 Dec 2008 12:49:58 GMT</pubDate>
  </item>
  
  <item>
    <title>The NetBeans 6.0 Story Continued: Using The Profiler</title>
    <link>http://www.weiqigao.com/blog/2008/01/31/the_netbeans_6_0_story_continued_using_the_profiler.html</link>
    
      
        <description>
          &lt;p&gt;&lt;a href= &#034;http://www.weiqigao.com/blog/&#034; &gt;Weiqi Gao&#039;s Observation&lt;/a&gt; has made quite a few posts about &lt;a href= &#034;http://netbeans.org/&#034; &gt;NetBeans&lt;/a&gt;.  Here&#039;s a list of the more interesting ones:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;2004/04/15: &lt;a href= &#034;http://www.weiqigao.com/blog/2004/04/15/netbeans_3_6_still_annoying.html&#034; &gt;NetBeans 3.6: Still Annoying&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;2005/05/03: &lt;a href= &#034;http://www.weiqigao.com/blog/2005/05/03/netbeans_vs_eclipse_why_not_both.html&#034; &gt;NetBeans vs. Eclipse---Why Not Both?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;2006/02/03: &lt;a href= &#034;http://www.weiqigao.com/blog/2006/02/03/netbeans_still_thinks_it_competes_with_eclipse.html&#034; &gt;NetBeans Still Thinks It Competes With Eclipse&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;2007/12/11: &lt;a href= &#034;http://www.weiqigao.com/blog/2007/12/11/netbeans_6_0_a_week_later_and_a_much_better_story.html&#034; &gt;NetBeans 6.0: A Week Later, And A Much Better Story&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As you can see, my opinion on NetBeans has evolved quite a bit.  And I believe it reflected the real progress that the NetBeans team has made in improving their product, which in turn reflects Sun&#039;s investment in this space.&lt;/p&gt;

&lt;p&gt;As I mentioned in my earlier post, I am still an IntelliJ IDEA user.  (I upgraded my personal license to 7.0 recently.)  However, with NetBeans and Eclipse being open source and free, I also wanted to use features in these tools that are not freely available for IDEA.&lt;/p&gt;

&lt;p&gt;Examples are: C++ development (both Eclispe and NetBeans), UML modeling (NetBeans 6.0), and Profiling (NetBeans 6.0).&lt;/p&gt;

&lt;p&gt;I had an opportunity to use the NetBeans 6.0 Profiler recently.  And I&#039;m quite pleased with what it can do.  Since my application is not very big, the actual time running the profiler, even with different sets of configuration parameters, are done very quickly.  Most of my time were spent on &#034;setting up the projects&#034; in NetBeans 6.0, which isn&#039;t hard either, just time consuming.  (This seems to be a good time to renew my &lt;a href= &#034;http://www.weiqigao.com/blog/2006/06/01/ant_build_files_should_be_generated_as_should_project_files_for_ides.html&#034; &gt;call for a way to generate project files&lt;/a&gt; for IDEs from simple, easy to specify project dependency description files.)&lt;/p&gt;

&lt;p&gt;Here&#039;s a few more of my observations after actually using NetBeans 6.0 for a short time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;NetBeans 6.0 starts up fairly fast, and is pretty responsive during use&lt;/li&gt;
&lt;li&gt;NetBeans 6.0 has a familiar feel to long time IDEA users&lt;/li&gt;
&lt;li&gt;NetBeans 6.0 projects are like IDEA 7.0 modules&lt;/li&gt;
&lt;li&gt;NetBeans 6.0 project groups are like IDEA 7.0 projects&lt;/p&gt;
&lt;li&gt;NetBeans 6.0 does not have a &#034;Built All&#034; menu item.  I have to build the projects one at a time&lt;/li&gt;
&lt;li&gt;NetBeans 6.0 does not have a &#034;Run All Tests&#034; menu item&lt;/li&gt;
&lt;li&gt;NetBeans 6.0 has global libraries but not project level libraries&lt;/li&gt;
&lt;li&gt;NetBeans 6.0 does not like it if project root is the same as the source path root&lt;/li&gt;
&lt;li&gt;NetBeans 6.0 projects are expressed as a build.xml file that uses subordinate Ant files in a nbproject/ subdirectory&lt;/li&gt;
&lt;li&gt;NetBeans 6.0 will built a jar for each project and put it in a dist/ subdirectory&lt;/li&gt;
&lt;li&gt;You better not touch the NetBeans 6.0 generated Ant build files&lt;/li&gt;
&lt;li&gt;When project B depends on project A, A/dist/A.jar is put into various classpaths for B&lt;/li&gt;
&lt;li&gt;The tests are not jarred and even if B depends on A, A&#039;s tests can&#039;t be seen by B&#039;s tests, this is different from IDEA&lt;/li&gt;
&lt;li&gt;NetBeans 6.0 disallows cyclic dependencies among projects (IDEA merely warns)&lt;/li&gt;
&lt;li&gt;NetBeans 6.0&#039;s profiler is easy to learn and use&lt;/li&gt;
&lt;li&gt;NetBeans 6.0 profiler output are very well organized and usefully presented&lt;/li&gt;
&lt;li&gt;NetBeans 6.0 says it supports profiling junit tests, but I can&#039;t make it to work&lt;/li&gt;
&lt;li&gt;When a project depends on a third party jar, there are two ways to specify that dependency: a Jar file dependency, which enables code completion but not debugging, ...&lt;/li&gt;
&lt;li&gt;... and to debug into a third party Jar, a &#034;Library&#034; (a Netbeans 6.0 concept) needs to be created with the proper paths and a Library dependency be created&lt;/li&gt;
&lt;li&gt;And as far as I can tell, NetBeans 6.0 does not support certain IBM source control system&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As you can see, as it stands, I can&#039;t use NetBeans 6.0 as the primary IDE for my project.  However, I was able to setup NetBeans 6.0 projects to mirror my IDEA project/module structure in such a way that I can build and test everything, and run the profiler on test applications.  I did gain valuable insight into the performance characteristics of my code.  And for that I think my time playing with NetBeans 6.0 is well spent.&lt;/p&gt;

&lt;p&gt;There is something magical about being able to profile your application.  It&#039;s the same feeling I had when I first debugged into my Java application in the IDEA debugger.&lt;/p&gt;

&lt;p&gt;Remember the time back then, when&lt;/p&gt;

&lt;pre style=&#034;margin-left:3em&#034;&gt;System.out.println(&#034;x = &#034; + x);&lt;/pre&gt;

&lt;p&gt;was considered a legitimate &lt;em&gt;debugging&lt;/em&gt; technique?&lt;/p&gt;

&lt;p&gt;A few years from now, we may view the pre NetBeans 6.0 time as the time when&lt;/p&gt;

&lt;pre style=&#034;margin-left:3em&#034;&gt;long start = System.nanoTime();
doIt();
long end = System.nanoTime();
System.out.println(end - start);&lt;/pre&gt;

&lt;p&gt;was considered a legitimate &lt;em&gt;profiling&lt;/em&gt; technique.&lt;/p&gt;
        </description>
      
      
    
    
    
    <comments>http://www.weiqigao.com/blog/2008/01/31/the_netbeans_6_0_story_continued_using_the_profiler.html#comments</comments>
    <guid isPermaLink="true">http://www.weiqigao.com/blog/2008/01/31/the_netbeans_6_0_story_continued_using_the_profiler.html</guid>
    <pubDate>Fri, 01 Feb 2008 04:50:56 GMT</pubDate>
  </item>
  
  <item>
    <title>NetBeans 6.0: A Week Later, And A Much Better Story</title>
    <link>http://www.weiqigao.com/blog/2007/12/11/netbeans_6_0_a_week_later_and_a_much_better_story.html</link>
    
      
        <description>
          &lt;p&gt;First, an apology: My &lt;a href= &#034;http://www.weiqigao.com/blog/2007/12/04/netbeans_6_0_released_still_doesnt_work_for_me.html&#034; &gt;initial reaction&lt;/a&gt; to NetBeans 6.0 seven days ago was overly harsh.  That post was made ten minutes after the download.  And now I&#039;m sorry (I&#039;m really sorry, as in &#034;I wish I never did it&#034;) I made that post in such a haste.&lt;/p&gt;

&lt;p&gt;Now I have some explaining to do.  As I mentioned in the &lt;a href= &#034;http://www.weiqigao.com/blog/2007/12/04/netbeans_6_0_released_still_doesnt_work_for_me.html#comment1196886882692&#034; &gt;comments&lt;/a&gt; to the earlier post, I tried two non-Java related features: C++ projects and UML reverse engineering.  The C++ project exhibited some weird behavior&amp;mdash;Netbeans claimed that my C++ project doesn&#039;t have any source files in it, despite my repeated attempts to add C++ source files to it.  The UML reverse engineering project did not behave as in the NetBeans tutorial&amp;mdash;no model was generated, only an XMI file.&lt;/p&gt;

&lt;p&gt;Over the weekend, something wonderful happened.  My Debian GNU/Linux 4.0 informed me that I have updates:&lt;/p&gt;

&lt;center&gt;
&lt;img src=&#034;http://www.weiqigao.com/blog/images/netbeans-comes-to-debian.png&#034; title=&#034;NetBeans 6.0 Comes To Debian GNU/Linux&#034; /&gt;
&lt;/center&gt;

&lt;p&gt;And I said, &#034;Cool, now I can get NetBeans updates from the Debian repository.&#034;  I did not mention this in my &lt;a href= &#034;http://www.weiqigao.com/blog/2007/11/04/getting_sun_java_6_on_debian_4_0_with_apt_pinning.html&#034; &gt;Getting Sun Java 6 On Debian 4.0 With APT Pinning&lt;/a&gt; post 37 days ago, but I also installed NetBeans 5.5 from the Debian unstable repository.  NetBeans is in the contrib portion of the Debian unstable repository, so I have to change my &lt;tt&gt;/etc/apt/sources.list&lt;/tt&gt; file:&lt;/p&gt;

&lt;pre style=&#034;margin-left:3em&#034;&gt;# deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official amd64 DVD Binary-1 200704
07-12:15]/ etch contrib main

deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official amd64 DVD Binary-1 20070407
-12:15]/ etch contrib main

deb http://ftp.debian.org/debian/ etch main non-free
deb-src http://ftp.debian.org/debian/ etch main non-free

deb http://security.debian.org/ etch/updates main contrib non-free
deb-src http://security.debian.org/ etch/updates main contrib non-free

deb http://www.debian-multimedia.org etch main
deb http://www.dipconsultants.com/debian etch main

### unstable #######
deb http://ftp.debian.org/debian/ unstable main &lt;span style=&#034;color: red;&#034;&gt;contrib&lt;/span&gt; non-free&lt;/pre&gt;

&lt;p&gt;and follow that with

&lt;pre style=&#034;margin-left:3em&#034;&gt;[root@gao]# &lt;b&gt;feta update&lt;/b&gt;
[root@gao]# &lt;b&gt;feta install netbeans-ide netbeans-platform&lt;/b&gt;&lt;/pre&gt;

&lt;p&gt;With that bit of work, my reward is the automatic update of the software packages when the new version comes out.&lt;/p&gt;

&lt;p&gt;To make a long story short (as I&#039;ve already made this short story long), I tried the same things on my Debian GNU/Linux 4.0 box, and they worked as expected.  I was able to create C++ applications, static libraries and dynamic libraries.  I was also able to reverse engineer a Java project to generate an UML model.&lt;/p&gt;

&lt;p&gt;That got me thinking.  What did I do wrong on my Windows box?  The only thing that I could think of was when I started NetBeans 6.0 for the first time, it asked &#034;I see that you have a NetBeans 5.5 profile in .netbeans, would you like me to import that?&#034; and I said yes.&lt;/p&gt;

&lt;p&gt;So I went back to my Windows box, deleted the .netbeans directory, and started NetBeans 6.0 again.  And this time my two tasks worked correctly even on the Windows box.&lt;/p&gt;

&lt;p&gt;One thing that I have to do to make the C++ project work is to add &lt;tt&gt;C:\cygwin\bin&lt;/tt&gt; to my System path, otherwise NetBeans couldn&#039;t find the compiler, the debugger, make or the shell.&lt;/p&gt;

&lt;p&gt;There you have it.  It&#039;s been a week, and I like NetBeans 6.0 a lot more.&lt;/p&gt;
        </description>
      
      
    
    
    
    <comments>http://www.weiqigao.com/blog/2007/12/11/netbeans_6_0_a_week_later_and_a_much_better_story.html#comments</comments>
    <guid isPermaLink="true">http://www.weiqigao.com/blog/2007/12/11/netbeans_6_0_a_week_later_and_a_much_better_story.html</guid>
    <pubDate>Tue, 11 Dec 2007 14:14:48 GMT</pubDate>
  </item>
  
  </channel>
</rss>

