Tuesday Jan 13, 2015

Free: Learn NetBeans on Udemy

Free! An excellent course for anyone working with NetBeans IDE, covers all the basics, as well as many advanced features. It is unbelievable that a course this good is available for free, make use of the opportunity today!

Click the image above or click here to get directly to the site to get started with the course!

Monday Jan 12, 2015

Free: Learn Java with NetBeans on Android

Free! Start learning Java and NetBeans on your Android phone today. A step by step guide is available that can be installed on Android, with many instructions and a thorough guide to Java with many illustrations and insights into NetBeans IDE:

Go here or click the link above and happy learning!

https://play.google.com/store/apps/details?id=net.samaysoftware.javanetbeans

Friday Jan 09, 2015

YouTube: Dynamic Actions in the NetBeans Platform

Sometimes you'd like your users to be able to create their own Actions at runtime, in addition to the Actions you may have predefined for them. Here's an example of how that would work, i.e., add new Actions and their Presenters to the User Directory, as shown here:

Thursday Jan 08, 2015

Classpath for Python Projects in NetBeans IDE

I've mentioned in this blog a few times recently the strides being made in rejuvenating the NetBeans support for Python, most recently in YouTube: Code Completion for Python in NetBeans IDE 8.0.2.

The newest development in that regard is new support for registering libraries on the classpath of Python projects (click to enlarge the image):

The above new feature isn't available in binary form yet, it's still being worked on. For the current state of the NetBeans IDE 8.0.2 plugin for Python, which includes quite some features already, including basic code completion, go here:

http://plugins.netbeans.org/plugin/56795/python4netbeans802

And, if you're lucky enough to be attending NetBeans Day in the Netherlands (12 February 2015), you'll find there'll be a session where the new Python features for NetBeans IDE 8.0.2 will be shown. Sign up for that event here:

http://pidome.wordpress.com/netbeans-day-februari-12th-2015-the-netherlands/

Wednesday Jan 07, 2015

NetBeans Software for Explosive Ordnance Disposal & Clearance Divers

Operating from offices in Edinburgh, Scotland, and San Diego, California, SeeByte has achieved a position of leadership in the development of smart software for underwater vehicles, sensors and systems in both the Military and Oil & Gas sectors. SeeByte provides products and services to major government and commercial clients around the world and a number of these products are developed using the NetBeans Platform.

SeeTrack Military is the leading technology used by Explosive Ordnance Disposal (EOD) and Clearance Divers around the world, to achieve success in managing their off-board assets during dangerous and demanding missions. As a commercially available, equipment independent mission planning, monitoring and post-mission analysis tool, SeeTrack Military generates a single integrated picture of events from multiple sensors and platforms, providing actionable information and fast results when it matters most. Designed with the operator in mind, this unique system for rapid on-site analysis and fusion of sensor data has been effectively utilized within numerous military & security exercises, surveys and operations.

Thursday Jan 01, 2015

NetBeans Top 5 Highlights of 2014

It's been a great NetBeans year in 2014 and here are the highlights as I see them!

  1. Release of NetBeans IDE 8.0, 8.0.1, and 8.0.2. Continuing a trend set in place by Oracle, NetBeans 8 was released in parallel with Java 8 this year. Need to refactor all your code to use lambdas and the Streams API? Look no further than NetBeans 8 to provide all the tools you need, as well as a great tutorial.


    Together with the strong focus on Java 8, the NetBeans 8 release integrates even more closely than before with new web technologies, such as Cordova, as well as HTML5, which is the subject of the next highlight.

  2. Continually growing commitment and innovation around HTML5. With its strong foundation in the Java ecosystem, NetBeans has over the past years been expanding its features in step with the needs of its users. Where once applets and JSP were dominant technologies, now JavaScript, with all its frameworks from Angular to Knockout and with all its supporting technologies such as Grunt and Karma, is the central domain of innovation. And that's where NetBeans is now squarely positioned, too. NetBeans as a tool for web development? Yes, indeed:

    Next, don't be surprised when you see NetBeans providing even more, and even deeper, support in these areas. For example, how about integration with Docker? So, don't be surprised when you hear more about that in the coming period...

  3. Very successful JavaOne 2014 and more NetBeans Days. I've blogged about the successful NetBeans Day at Java One 2014 before, but let me reiterate again how successful it was.

    Full rooms, especially James Gosling drawing crowds (so that we had to switch to a larger room than planned at the last minute), and the great panel discussions (i.e., sessions with 5 speakers, all talking about a common theme, e.g., teaching with NetBeans or Maven and NetBeans, etc.) NetBeans as a tool for "Internet of Things", as the very best tool available for Maven development, as well as for Java EE and HTML5, these were very clear themes in NetBeans Day and at JavaOne as a whole.

    Also announced was the new NetBeans Teachers community and the start of a continual series of NetBeans Days around the world, the first of which was the recently held NetBeans Day Germany. And, guess what, 12 February will be NetBeans Day Netherlands and 16 March NetBeans Day Germany, again! More details about these here and elsewhere when they become available.

  4. NetBeans Dream Team expansion. Over the past months, 16 new members joined the NetBeans Dream Team, mainly from Germany, the UK, and USA. They bring expertise and insight into all the areas of software technology and are a great benefit in keeping the NetBeans team in touch with ongoing discussions in the community at large. Moreoever, they're great representatives of the core ideas of the NetBeans ecosystem at conferences and events around the world. Over the coming year, I'm looking forward to seeing even more new faces in the NetBeans Dream Team, there's already several who have indicated that they'd like to be part of this community too. The enthusiasm around NetBeans is simply unstoppable!

  5. Books. More books have been written about NetBeans over the past year than ever before. On NetBeans IDE itself, as a tool, see NetBeans IDE 8 Cookbook, by David Salter and Rhawi Dantas; on Java EE and NetBeans, see Java EE 7 Development with NetBeans 8 by David Heffelfinger, on Java EE, HTML5, and NetBeans, see Java EE and HTML5 Enterprise Application Development, by Arun Gupta, JB Brock, and myself, and on NetBeans Platform, see NetBeans Platform for Beginners by Walter Nyland and Jason Wexbridge and JavaFX Rich Client Programming on the NetBeans Platform by Gail and Paul Anderson.

    For example, here's the excellent book by Walter Nyland, and Jason Wexbridge, on the ins and outs of the NetBeans Platform, a book you absolutely must get if you're interested in extending/building on top of NetBeans in any way at all:

    NetBeans Platform for Beginners -  book cover

    Can you believe these were all published over the past year? Plus there are probably some that I left out.

Into the New Year, and throughout 2015, I'm excited about the support for other technologies around NetBeans, thanks to the great community around NetBeans. In particular (and click the following links for details), support for Scala, Python, Android, and UML has been increasing further over the last few months and will continue to do so over the coming year. Also, you should expect NetBeans Facebook and the NetBeans YouTube Channel to grow even further than it did over the past year, while the new NetBeans Community Podcasts will power on, too!

More and more, I'm seeing NetBeans as a mechanism for getting to see friends around the world. :-) (And a big highlight in that regard was the GDG Conference in Istanbul, Turkey last month.) Looking forward to seeing them all again this year and making many new ones!

Sunday Dec 28, 2014

YouTube: Code Completion for Python in NetBeans IDE 8.0.2

In 5 minutes, learn how to get started with Python in NetBeans IDE 8.0.2, including for the first time basic code completion.

Get the plugin here: http://plugins.netbeans.org/plugin/56795/python4netbeans802

Friday Dec 26, 2014

YouTube: OpenShift and NetBeans IDE

Watch a quick movie about how, in addition to using Oracle Cloud, Amazon Beanstalk, and Jelastic, you can also use Red Hat's OpenShift directly from within NetBeans IDE.

Get the plugin here: http://plugins.netbeans.org/plugin/56913

Wednesday Dec 24, 2014

YouTube: 5 Reasons Why NetBeans Should be in Every Developer's Toolkit

New NetBeans Dream Team member Mark Stephens, from IDR Solutions in the UK, did an excellent overview of key NetBeans features during the recent Google Dev Fest in Istanbul, Turkey. Most of it can be watched on YouTube, right here:

Monday Dec 22, 2014

Integrating Cloud Providers into NetBeans IDE (Part 6)

A mistake I made in part 3 was to assume that the user of a Cloud provider plugin would, when creating a new application to be deployed to the Cloud, use one of the standard NetBeans IDE project templates as a starting point. Instead of that, however, it is much more likely that the user will want to use one of the templates that the Cloud provider itself makes available.

In the case of OpenShift by Red Hat, those templates are called "cartridges". Let's enable the user of OpenShift in NetBeans IDE to select one or more cartridges made available via the OpenShift Java Client.

But before actually using the OpenShift Java Client to create new applications via OpenShift cartridges, there are three nitpicky areas to focus on, to make the life of the user a lot better than it would otherwise be—(1) validation of entries in the GUI in NetBeans for creating new OpenShift applications, (2) handling of long running tasks, and (3) handling of exceptions thrown by the OpenShift Java Client.

For the first item in the list, below you see the result, the Simple Validation API by Tim Boudreau married with the validation mechanism in the NetBeans Wizard API, thanks to page 580 and onwards (and earlier) in Paul and Gails' JavaFX Rich Client Programming on the NetBeans Platform:

Next, a rather tricky problem arises because, after filling out the above wizard step, one clicks Next, at which point a long running task starts up because the OpenShift Java Client needs to access and display the available cartridges, as well as other information, such as the available domains. That's the second item in the list above, my solution being an implementation of a solution from Chet and Romain's Filthy Rich Client book, as discussed by me here some years ago.

Once the above process completes, the available domains and cartridges are displayed, while the same validation techniques are used to switch on/off the Finish button, based on whether the Simple Validation API code has done its job.

The third problem, around exception handling of OpenShift exceptions, e.g., if the connection fails or if the password is wrong, or many other ifs, will be handled in a next part of this series.

When the exception handling is completed and the business logic is added for actually creating new OpenShift applications when Finish is clicked above, the NetBeans/OpenShift plugin should be ready to be used, since it's already possible to view the deployed applications in the Services window and access the related Git sources, as described in previous entries in this series over the past few days.

Sunday Dec 21, 2014

Integrating Cloud Providers into NetBeans IDE (Part 5)

A small piece to add to the Cloud provider integration is... Git. Since you're able to display all the resources of interest that are made available by the Cloud provider, you should be able to let the user physically access the related sources:

Clicking the menu item above can directly open the Clone Repository dialog, which is part of the Git tools in NetBeans IDE: 

A few clicks later, you have the sources available locally, and you can then make changes to them and commit them, etc, using the range of Git tools made available by NetBeans IDE.

Saturday Dec 20, 2014

Integrating Cloud Providers into NetBeans IDE (Part 4)

The next step in the process, now that we can register a Cloud provider and create new applications that will be deployed to it, is to actually deploy applications to the Cloud provider.

As an example I've taken OpenShift by Red Hat which, when you've created your application on it, shows you this result in the browser:

Also take note of the information in the Deployment Output window above, which comes from OpenShift.

To get to the above point, I created a new Java web application, registered it to be deployed to the Cloud provider, and then deployed it.

The relevant code that had to be added is all in the FooDeploymentManager class and in the FooCloudInstance class.

The source code of the current state is here:

https://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0.2/cloud/part4

The next step is to somehow add functionality to show whether an application is deployed, started, or stopped, via icons on the application nodes.

Integration with Git will be the area to look at after that. I have created an SSH key and turned it into a PPK file, which enables me to use Git in NetBeans IDE to get to the Git repository for the application I've created on the Cloud, i.e., in this specific case, Red Hat OpenShift.

Friday Dec 19, 2014

Integrating Cloud Providers into NetBeans IDE (Part 3)

Now that we (1) can register new Cloud providers under the Cloud node and (2) automatically enable the resources made available by our Cloud provider to be displayed under the Servers node, let's take the next logical step in the development of our generic Cloud provider plugin for NetBeans IDE.

And what is the next logical step? Well, when the user creates a new Java web application, whether Ant-based or Maven-based, they need to be able to choose the server made available by your Cloud provider, which is "Foo" in our case:

When they click Next above, assuming the user hasn't registered the Cloud provider already, the same dialog as shown when registering the Cloud provider from the Cloud node needs to be shown:

And then the user should be able to set the standard settings, such as the Java EE version and the context path, as shown below: 

When Finish is clicked, the project structure shown below, both Ant-based and Maven-based (depending on which of the wizards was selected) needs to be generated: 

In addition, since the Cloud provider has been registered in the New Web Application wizard, the Servers node and the Cloud node should now both display relevant child nodes: 

All of the above is made possible by means of the org.netbeans.modules.foo.j2ee package that you see below, which contains classes that are registered in the "J2EE/DeploymentPlugins/Foo" folder in the layer.xml file: 

The complete source code of the current state of the plugin is here: 

https://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0.2/cloud/part3

Thursday Dec 18, 2014

Integrating Cloud Providers into NetBeans IDE (Part 2)

The next step is to, whenever a new Cloud provider is registered and displayed under the Cloud node, automatically display a related node under the Servers node. In the example below, you see that the related node under the Servers node displays the resources deployed to the Cloud provider:

As with other Cloud providers integrated into NetBeans IDE, you want the node under the Cloud node to not have any children, while the node under the Servers node should be expandable, displaying resources that are made available by the Cloud provider.

When you look at the source code of similar plugins in the NetBeans source tree, i.e., for Oracle Cloud and for Amazon Beanstalk, you'll see how important it is to have clear naming conventions. After all, there are two nodes you need to provide and two of several other things, one for under the Cloud node and one for under the Servers node.

I also recommend keeping the Cloud-specific code as separated from the generic code as possible.

Above, you can see two ChildFactories right at the end, one implemented for OpenShift, the other empty for Cloud Foundry, where a connection is made to the Cloud and resources are retrieved. Right now, I have the OpenShiftChildFactory hooked into the FooServerInstanceImplementation, though if the other one were to be filled out it should be possible to directly swap it into the code.

All the code that you see above is found here:

https://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0.2/cloud/part2

As before, the entry point for understanding the code that registers the node under the Servers node is in the layer.xml file, where you will find FooServerInstanceProvider is registered in the Servers folder.

Wednesday Dec 17, 2014

Integrating Cloud Providers into NetBeans IDE (Part 1)

Many cloud providers exist (see here for some of them) and several have integration points via Java APIs. Some of these are Oracle Cloud, Jelastic, Amazon Beanstalk, Red Hat OpenShift, and Pivotal Cloud Foundry. And some of those are already integrated into NetBeans IDE, so that you can login, view the resources that have been deployed, and deploy new resources, together with the reverse activities, e.g., undeploying and unregistering. Others not (yet) and so let's give potential integrators a leg up by showing how to get started integrating their cloud offerings into NetBeans IDE.

Here's the applicable NetBeans API:

http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-server/overview-summary.html

Now let's get a 'hello world' scenario up and running, for an imaginary Foo Cloud.

Here's the source code:

https://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0.2/cloud/part1

When you download and run that module, you'll be able to right-click on the Cloud node and choose Add Cloud...

...and then, in addition to the Amazon Beanstalk, which NetBeans provides by default, you'll see Foo:

When you click Next, above, you'll be able to enter a name:

When you click Finish, above, the name you entered will be the name of a new node that will appear automatically under the Cloud node:

When you close the IDE, after registering a Cloud provider like the above, and restart the IDE, you'll see the Cloud providers you registered automatically being displayed again under the Cloud node.

The file structure of the NetBeans module, shown in the first screenshot above, is as simple as it can be as a basic starting point for integrating your own Cloud provider. To understand the code, the starting point is to take a look at the layer.xml file, where you'll see that FooServerInstanceProvider and FooServerWizardProvider are registered.

In subsequent blog entries, we'll extend this example to provide less generic and more specific features for integrating various Cloud providers.

Tuesday Dec 16, 2014

MIT Lincoln Laboratory Network Activity Analysis with Java and NetBeans

"Analysts can glean much useful intelligence information from identifying relationships between individuals and groups, and tracking their activities. However, detecting networks of people and then investigating their activities are difficult tasks, especially in this era of information overload. Graph analysis has proven to be a useful tool for addressing these tasks, but it can be labor-intensive. To aid in this analysis, MIT Lincoln Laboratory researchers have developed a diffusion-based analytic that helps solve the problems of network discovery and prioritized exploration"

The above is directly from here: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.406.4523

In response, the BlueStreak Exploitation Tool has been developed, "to support data visualization, graph construction, algorithm services, and analyst collaboration within the network-discovery framework".

Tools and technologies used include the NetBeans Platform, NASA World Wind, JUNG, Apache Tomcat, and Apache ActiveMQ.

And here's the full PDF from the Lincoln Laboratory Journal, Volume 20, Number 1, 2013.

Monday Dec 15, 2014

Tiling of Editor Documents in NetBeans Platform Applications

A very exciting development for NetBeans users (and developers of applications based on the NetBeans Platform) everywhere.

Take a look at the screenshot below.

Take a look at it again, in particular the buttons within the red rectangle:

Right now, as you can see, those buttons are disabled. Now, however, because more than one document is open, those buttons are enabled:

The buttons are for tiling the editor documents. Here you can see the effect of clicking "Tile Evenly", which is the third of the four buttons:

And this is "Tile Vertically":

There's also "Tile Horizontally" and "Tile Single" (which untiles the tiled documents).

If you'd like this in NetBeans IDE, download the plugin here (restart NetBeans after installing the plugin), while this is also a plugin that is relevant to any other application on the NetBeans Platform that has editor documents. These documents can either be actual text editors or TopComponents of some other kind, e.g., GUI components where the user should be able to enter data of some kind.

http://plugins.netbeans.org/plugin/56815

The source code of the above is here, so that you can integrate it into your own NetBeans Platform application, and where you can also read more about it, including the implementation code, of course:

https://github.com/GeertjanWielenga/TiledNetBeansEditors

Many thanks to Norman Fomferra and others from Brockmann Consult in Germany, who created and open sourced this solution as part of the ESA Sentinel Toolbox, a NetBeans Platform application that is being created for the European Space Agency:

https://github.com/senbox-org/snap-desktop

Here's the ESA home of the Sentinal Toolboxes:

https://sentinel.esa.int/web/sentinel/toolboxes

They've extended the tiling idioms already, so that they now have tileable internal desktops, i.e., workspaces, with floating TopComponents.



They'll be separating out this solution, so that this will be pluggable, and the sources available separately, too. Pretty cool having rocket scientists (OK, they'll deny they're that, but they work in the space industry and are computer scientists, which to me means you're a rocket scientist) working on NetBeans code, isn't it? :-)

Sunday Dec 14, 2014

NetBeans Tools for Teachers: Quick Runtime Properties Setter

Imagine you're a teacher. You're teaching a Java course and your students turn in their homework exercises in the form of NetBeans projects. Now you have thirty NetBeans projects, many of them open in NetBeans IDE. For each of them, you need to load an external file as an argument to the main class. Then that file is processed and you can then see whether the code works as expected.

To set the file as an argument for a project, you need to right-click the NetBeans project, choose Properties, and then go to the Run tab, where you can set the runtime argument. That's a lot of tedious work for 30 different projects, plus sometimes you need to change the argument because you want to run a different file or some other set of arguments against the code that your students have provided.

Precisely this problem was described to me at the Hanzehogeschool in Groningen some weeks ago by Michiel Noback, who is one of the teachers there. In the first implementation of the solution, I created a plugin that lets you type the runtime arguments of the current project in the status bar. But, of course, then new requirements came in, one of which was to have some kind of history of the entered arguments, so that the teacher can easily reuse previously used arguments. The status bar isn't a good place for this, since a drop-down list of some kind is needed, so I moved the feature into the toolbar:

Take note of the drop-down list in the toolbar above. How to use this feature? Firstly, make sure a file is open from the project where you want to set the runtime properties via the drop-down list in the toolbar. It can be any file from that project, most logically it would be a Java source file, since that's where you'll be focused on when examining a student's work. Then go to the drop-down list in the toolbar and type the arguments you'd like to pass into the constructor of the application. Then, importantly, press Enter. When you press Enter, a change is made to the project.properties file where the runtime arguments are defined. At the same time, the arguments you entered are added to the list in the drop-down, so that you can later look in that list, find the arguments you'd like to reuse, and then press Enter again to apply them to some other current project you're looking at.

Get the plugin here, works in NetBeans IDE 8.0.2:

http://plugins.netbeans.org/plugin/56693

Apparently there's a bug with this, related to setting breakpoints, but I haven't been able to reproduce that problem yet.

Saturday Dec 13, 2014

YouTube: Integrate Code Templates into Code Completion

When you assign a code template to a context, the Code Completion box will show your code template in the context where you're working. Nice and powerful and hidden tip, watch it in action here:

Related discussion: https://netbeans.org/bugzilla/show_bug.cgi?id=212176

Friday Dec 12, 2014

YouTube: Code Templates in NetBeans IDE

Everything you need to know about where and how to find, display, and configure code templates in NetBeans IDE!

About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« March 2015
SunMonTueWedThuFriSat
4
14
15
16
22
29
30
31
    
       
Today