Česky   |  Deutsch   |  English   |  Español   |  Français   |  Indonesia   |  日本語   |  한글   |  Polski   |  Português (BR)   |  Türkçe   |  中文   |  正體中文   |  Your Language  
PlanetNetbeans
Planet NetBeans is an aggregation of NetBeans related musings from all over the Blogosphere.
Feeds
[RSS 1.0 Feed] [RSS 2.0 Feed]
[FOAF Subscriptions] [OPML Subscriptions]
Do you blog about NetBeans ? Add your blog to PlanetNetBeans.
Feed Subscriptions
NetBeans Zone - The social network for developers (feed)
APIDesign - Blogs (feed)
Pandaconstantin (feed)
blogtrader - Blog (feed)
J. O'Conner » NetBeans (feed)
David R. Heffelfinger (feed)
Carsten Zerbst's Weblog (feed)
Winston Prakash's Weblog (feed)
ProNetBeans (feed)
Paulo Canedo » NetBeans English (feed)
Need to find a title (feed)
Category: NetBeans | Software and Science (feed)
Roger Searjeant's blog (feed)
Optonline Webmail (feed)
Michael's blog » NetBeans (feed)
Allan Lykke Christensen » NetBeans (feed)
Inspiration and Expression » Netbeans (feed)
Adam Bien (feed)
Ignacio Sánchez Ginés » NetBeans (feed)
Bernhard's Weblog (feed)
Michel Graciano's Weblog (feed)
Ramon.Ramos (feed)
Ozone and Programming » netbeans (feed)
NetBeans Ruminations » NetBeans (feed)
Tiplite » netbeans (feed)
Bistro! 2.0 (feed)
Arun Gupta, Miles to go ... (feed)
Geertjan's Blog (feed)
.JARa's Bilingual Weblog (feed)
JavaFX Composer (feed)
The Java Jungle (feed)
Jesse Glick (feed)
Martin Grebac (feed)
The NetBeans Community Podcast (feed)
NetBeans Profiler (feed)
NetBeans for PHP (feed)
NetBeans Web Client (feed)
Rechtacek's (feed)
Virtual Steve (feed)
My First Blog - Satyajit Tripathi (feed)
The Aquarium (feed)
Tinuola Awopetu (feed)
Insert Witty Irony Here (feed)
mkleint (feed)
Anuradha (feed)
Netbeans6/6.5 my best practices (feed)
Java Evangelist John Yeary's Blog (feed)
Neil's Dev Stuff (feed)
Computer says null; (feed)
NetBeans Adventures, Java and more (feed)
NetBeans Community Docs Blog (feed)
The Netbeans Experience (feed)
NbPython/ jpydbg / pymvs (feed)
Shanbag's Blog (ರಜತ ಲೋಕ) (feed)
Wade Chandler's Programming Blog (feed)
Big Al's Blog (feed)
Code Snakes (feed)
In perfect (spherical) shape (feed)
Van Couvering Is Not a Verb (feed)
Diego Torres Milano's blog (feed)
Vroom Framework (feed)
Messages from mrhaki (feed)
Jeff's Blog (feed)
Manikantan's Netbeans (feed)
Oliver Wahlen's Blog (feed)
Shuttle between Galaxies (feed)
Welcome to my live... (feed)
Netbeans IDE Blog by Tushar Joshi, Nagpur (feed)
Devel Blog (feed)
diamond-powder (feed)
Antonio's blog (feed)
Where's my Blog?!

Powered by:    Planet

Last updated:
July 29, 2014 02:37 PM
All times are UTC

Sponsored by
sponsored by Oracle

visit NetBeans website
Geertjan's Blog - July 29, 2014 02:11 PM
Update 5 for "NetBeans Platform for Beginners"

Another monthly update of "NetBeans Platform for Beginners" is available.

Everyone who has already bought the book has received, or will be receiving, an e-mail with instructions on how to get the latest update for free.

All others are warmly invited to join in reading, and commenting on, the (in my humble opinion) best book written about the NetBeans APIs:

https://leanpub.com/nbp4beginners

NetBeans Zone - The social network for developers - July 29, 2014 07:24 AM
Ben Evans: My Five Favorite NetBeans IDE Features!

Following on from Ciprian Turcu, 

Adam Bien - July 29, 2014 03:05 AM
WLS 12c (12.1.3) and Java EE 7, Some Smoke

WLS 12c supports some Java EE 7 API like: JSON Processing (JSR 353), JAX-RS 2.0, JPA 2.1 http://docs.oracle.com/middleware/1213/wls/NOTES/index.html. Now it is time for a Smoke Test:

  1. Download size is reasonable: 198,7 MB for a generic ZIP. However: the download requires a login to OTN. This is an unnecessary barrier for developers.
  2. Installation is easy: setting a MW_HOME variable pointing to the extraction folder and executing the configure.sh
  3. NetBeans 8 integration worked out-of-the-box. Application was directly deployed from NetBeans with Maven 3. WLS is nicely integrated with NetBeans: you can start, stop and deploy your application directly from NetBeans. Also a useful feature: WLS and GlassFish are using different ports--you can run both servers at the same time.
  4. wls12c was installed on Java 8 (1.8.0-b132 / mac) without any problems
  5. Java EE 6 tests were passed

Interestingly: a basic JAX-RS service with JsonObject works perfectly on GlassFish v4, but fails on WLS 12.1.3:


@Stateless
@Path("alert")
public class AlertResource {

    @Inject
    FireState fireState;

    @GET
    public JsonObject get() {
        return Json.createObjectBuilder().
				add("Smoke?:", fireState.isSmoke()).
				build();
    }
}

<Error> <com.sun.jersey.spi.container.ContainerResponse> <BEA-000000> <Mapped exception to response: 500 (Internal Server Error) javax.ws.rs.WebApplicationException: com.sun.jersey.api.MessageException: A message body writer for Java class org.glassfish.json.JsonObjectBuilderImpl$JsonObjectImpl, and Java type interface javax.json.JsonObject, and MIME media type application/octet-stream was not found.

Seems like the "Accept" header is ignored. The request was initiated by: curl -H "Accept: application/json" http://localhost:7001/server-smoke/resources/alert and browser link.

See you at Java EE Workshops at MUC Airport or on demand and in a location very near you: airhacks.io!


Real World Java EE Workshops [Airport Munich]>

NetBeans Zone - The social network for developers - July 28, 2014 11:32 AM
NetBeans in the Classroom: You Must Use Maven in the Classroom (Part 1)

Ken Fogel is the Program Coordinator and Chairperson of the Computer Science Technology program at Dawson College in Montreal, Canada. He is also a Program Consultant to and part-time instructor in the Computer Institute of Concordia University's School of Extended Learning. Preview Text:  Regular NetBeans education columnist Ken Fogel, the Program...

Geertjan's Blog - July 27, 2014 10:44 AM
Karma: Debugging JavaScript Unit Tests

In NetBeans IDE 8.0, you're able to debug JavaScript unit tests via JS Test Driver. In the upcoming NetBeans IDE 8.0.1, JavaScript unit test debugging has been extended to include Karma, as well.

Right-click an HTML5 project and, when you select Karma in the JavaScript Testing tab, you can enable debugging, as shown below. (The new Karma Istanbul code coverage integration was discussed in this blog yesterday.) 

As you can see below, the drop-down lets you choose on which device you want to debug your unit tests:

Then, on the Karma node of your project, enable debugging and start Karma:

Then you can follow the steps in "Debugging a JS Unit Test with JS Test Driver" in the NetBeans tutorial Debugging and Testing JavaScript in an HTML5 Application, with the result shown below, click to enlarge the image.

NetBeans Zone - The social network for developers - July 27, 2014 05:30 AM
The Best of the Week (July 18): Enterprise Integration Zone

Make sure you didn't miss anything with this list of the Best of the Week in the Enterprise Integration Zone (July 18 to July 25). Here they are, in order of popularity: Preview Text:  Make sure you didn't miss anything with this list of the Best of the Week in the Enterprise Integration Zone (July 18 to July 25). This week's topics...

Java Evangelist John Yeary's Blog - July 26, 2014 08:00 PM
JSF 1.2: Visual Web Pack (Project Woodstock) Java Persistence API Example

Master-Detail Example
This is some example code that I have for a Visual Web Pack (VWP) project that demonstrates some complex data table examples.

I often fantasize about being able to get the band back together and make Woodstock 2.0. Here is an example of why. This was complex for JSF 1.2.

The code can be downloaded from: vwpjpaexamples

I would strongly recommend using NetBeans 6.5.1 to build and run the example project.

Java Evangelist John Yeary's Blog - July 26, 2014 07:59 PM
JSF 1.2: Project Woodstock Button Facet Table

I was going through some old code examples. I found one created with Sun Studio Creator. Yes, it was very old.

The original example was developed by Winston Prakash.

I did some updates to Project Woodstock from the original Project Rave, and came up with a pretty new example page.

The project can be downloaded here: ButtonHeaderTable

Note: You will need to use NetBeans 6.5.1, or 6.7.1 to run it.

Java Evangelist John Yeary's Blog - July 26, 2014 07:58 PM
JSF 1.2: Woodstock Collapsible Group Table Example

Collapsible Group Table Example
Here is another example of a Project Rave data table converted to Project Woodstock. Project Woodstock was a great idea and the implementation with Visual JSF was the right path to go with JSF development. It is a shame that the project was canceled by Sun. I met a lot of great people who worked on the projects, and are still friends today. The code for this project was originally developed by Winston Prakash at Sun.

The code was developed using NetBeans 6.5.1 and can be downloaded from BitBucket here: CollapsibleGroupTable


Java Evangelist John Yeary's Blog - July 26, 2014 07:57 PM
JSF 1.2: Project Rave Single Selection Table

Single Selection Table
Here is another example Project Rave/Woodstock project originally written by Winston Prakash for Sun Studio Creator 2. It has been updated using NetBeans 6.5.1 and tested on Glassfish 2.1.1.

The project can be found on BitBucket here: SingleSelectionTable

Java Evangelist John Yeary's Blog - July 26, 2014 07:57 PM
JSF 1.2: Project Woodstock Multiple Selection Table Example

Multiple Selection Table

This is another example of a Project Woodstock project that was converted from Project Rave and Sun Studio Creator 2. This example details a multiple selection table, and was originally created by Winston Prakash.

I have updated the project using NetBeans 6.5.1 and tested on GlassFish 2.1.1.

The updated project can be found on BitBucket here: MultipleSelectionTable

Java Evangelist John Yeary's Blog - July 26, 2014 07:56 PM
JSF 1.2: Project Woodstock Application using JPA

Woodstock Dataprovider Entity Example
Here is another example of using Project Woodstock along with JPA in an Enterprise Application. The project requires the sample database included in NetBeans.

The project was updated using NetBeans 6.5.1.


The code for the project can be found on Bitbucket here: WoodstockJPAApplication

Geertjan's Blog - July 26, 2014 12:49 PM
Karma Istanbul Code Coverage in NetBeans IDE

Nice job—all your tests are passing. However, it's pretty useful to at least know the percentage of code that's under test. No one's saying that all your code should be under test, just that it's hard to argue against being able to be aware that your 100% test pass rate applies to 20% of your code.

In the JavaScript world, a popular solution in this area is Karma Coverage, which is based on Istanbul, and for which the upcoming NetBeans IDE 8.0.1 has handy integration:

Look at the above screenshot—with one glance you can see the statement in my code that has not been tested.

To get to the above screenshot, I read this article and then checked out this code on GitHub, and then simply opened it in NetBeans IDE, and clicked the menu items that you see above that appear magically on the project when opened into NetBeans IDE, while this is also handy.

Here's the test spec for the above JavaScript file, notice that one test method is commented out. If it were not commented out, the above code coverage would pass 100%.

describe("sqrt", function() {

//  it("should compute the square root of 4 as 2", function() {
//    expect(My.sqrt(4)).toEqual(2);
//  });

  it("should throw an exception if given a negative number", function() {
    expect(function(){ My.sqrt(-1); }).toThrow(new Error("sqrt can't work on negative number"));
  });

});

For a fullblown NetBeans IDE tutorial on debugging and testing HTML5/JavaScript applications, see this document, though note that it doesn't include code coverage yet, since that's not in the current release of NetBeans IDE:

https://netbeans.org/kb/docs/webclient/html5-js-support.html

Geertjan's Blog - July 25, 2014 09:16 AM
Grunting in NetBeans IDE

Grunt tasks are to JavaScript what Ant targets and Maven goals are to Java.

You can "grunt" on the command line, but also directly in NetBeans IDE.


Here I'd like to take a look at where the feature set in NetBeans IDE is going with Grunt.

Let's say we've got hold of the AngularJS Seed template. Doing this is simple in NetBeans IDE via the New HTML5 Project wizard, which gives you an option to let NetBeans IDE download the AngularJS Seed template as the basis of the new application.

Once you have your application, hop over to the New File dialog and create your Grunt file:

Next, here's a handy Grunt definition that creates three tasks, for copying to a 'build' directory, for cleaning that directory, and for combining the two tasks, thanks to this article:

module.exports = function (grunt) {
    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        copy:{
            build:{
                cwd:'app',
                src:['**'],
                dest:'build',
                expand:true
            }
        },
        clean:{
            build:{
                src:'build'
            }
        }
    });
    grunt.loadNpmTasks('grunt-contrib-copy');
    grunt.loadNpmTasks('grunt-contrib-clean');
    grunt.registerTask(
        'build',
        'Compiles all the assets and copies the files to the build directory.',
       [ 'clean', 'copy' ]
    );
};

Copy the above into your Grunt file. The above means that in the 'package.json' file that is already part of the AngularJS Seed template, you need to add two new dependencies, shown in bold below:

"devDependencies": {
"karma": "~0.10",
"protractor": "~0.20.1",
"http-server": "^0.6.1",
"bower": "^1.3.1",
"shelljs": "^0.2.6",
"karma-junit-reporter": "^0.2.2",
"grunt-contrib-copy":"0.4.x",
"grunt-contrib-clean":"0.4.x"

},

Then right-click on the project and choose "Npm install", which is new in the upcoming NetBeans IDE 8.0.1, though the development builds are already available:

Then, also new in NetBeans IDE 8.0.1, right-click on the project and notice that you have access to the tasks via the new "Grunt Tasks" menu item:

Also, again new in NetBeans IDE 8.0.1, you can map your Grunt tasks to project commands:

Now, when you right-click your project and choose "Build", "Clean", and "Clean and Build", you automatically delegate the handling of the action to the underlying Grunt task.

The icing on the cake is that the project commands "Build", "Clean", and "Clean and Build" can be mapped to keyboard shortcuts. For example, map "Build" to a keyboard shortcut and then, when it is pressed, the related Grunt task of the currently active project will be invoked.

Grunt could almost not be integrated more snugly into NetBeans IDE. Maybe an enhancement could be to provide some predefined templates as examples of what can be done with Grunt, to really get you up and running quickly.

Related reading:

Geertjan's Blog - July 24, 2014 08:43 AM
Bower and Node.js in NetBeans IDE

With more and more HTML5/JavaScript/CSS3 frameworks using packaging solutions provided by Bower and Node.js, it can become a bit tricky for you to set up projects... hard to see the forest for the trees sometimes with so many different solutions striving valiantly to help you but tripping each other up in the process. Despite their innovations, it also becomes slightly cumbersome to share projects with team members because each of them need to run Bower and/or Node.js on the command line, before beginning with their programming tasks. Finally, it becomes difficult for NetBeans IDE to bundle HTML5 sample projects efficiently, as described in my earlier blog entry AngularJS Seed, Bower, and NetBeans IDE 8.

However, in the upcoming NetBeans IDE 8.0.1 release, there's a very elegant mechanism that helps bridge the flexibility offered to frameworks by Bower and Node.js with the assumptions one has when getting started with predefined project structures and when working with shared projects.

Let's go through the process, using a daily development build of the pure HTML5/PHP distribution of NetBeans IDE. First, create a new HTML5 application:

Give it a name and location:

Choose the Angular Seed Template:

The above means that a connection is made to the on-line repository where the HTML5 Angular Seed template is found. The team responsible for that template can change it anytime they like, which is exactly what they're doing now and then, by changing the structure of the seed template as well as the libraries it depends on.

On completing the wizard, notice (for the first time in NetBeans IDE 8.0.1) the error badge in the project icon and the project name is in red:

That tells you that some of the dependencies declared by Bower or Node.js or both have not been satisfied.

Right-click and notice 'Npm install' and 'Bower install' can be called directly from here, as well as 'Resolve Project Problems':

When you select that menu item, NetBeans IDE tells you 'hey, there's a bunch of stuff missing, based on analysis of the Bower and Node.js definitions in your project':

When you click "Resolve" above, all the stuff that needs to be added to the project is automatically added, below a very small segment of all the stuff that happens in the background for you is shown:

Now that's pretty cool. Whenever you open any HTML project into NetBeans IDE, i.e., straight via a template like the above, or by opening a project with existing sources on disk, NetBeans IDE will tell you whether Bower or Node.js should be run, and it will then run it for you, and thereby resolve project dependency problems for you... so that you can begin coding really quickly without having to worry about all these messy set up details. 

Also, this makes sharing projects between team members nice and easy. Define your dependencies via Bower or Node.js, pass the project to your team members however you like, and then let NetBeans IDE access the dependencies and add them to the project for you. 

In short, this really feeds in very well to the concept of "Integrated AngularJS Development".

Geertjan's Blog - July 23, 2014 10:11 AM
Distinct Icons per Java Type in NetBeans IDE

Especially useful in the editor tabs, where you could have multiple documents open at the same time, often not with names that reveal the type, and now you can quickly ascertain the type via each tab, i.e., here you can immediately see which one is the interface:

For details:

Many thanks Hermien Pellissier from South Africa for raising this issue! It will be available from NetBeans IDE 8.0.1 onwards.

NetBeans Zone - The social network for developers - July 22, 2014 01:16 PM
NetBeans Weekly News (Issue #649 - July 22, 2014)

Project News Centigrade: New NetBeans Partner Centigrade, with its NetBeans BizLaf plugin, is the latest addition to the NetBeans Partners page. Does your company also add value to NetBeans IDE? Let us know at netbeans dot webmaster at gmail dot com! Preview Text:  In this issue: Centigrade joins the NetBeans Partner Program; Monet, a new plugin...

NetBeans Zone - The social network for developers - July 22, 2014 08:02 AM
Joachim Arrasz: My Five Favorite NetBeans IDE Features!

Following on from Ciprian Turcu, 

Geertjan's Blog - July 22, 2014 07:00 AM
World's Simplest NetBeans Node/TopComponent Implementation

In 2008, here, I documented the world's simplest NetBeans Node implementation. Here's the updated implementation, using ChildFactory, together with the code needed for connecting it into a TopComponent:

public final class ViewerTopComponent extends TopComponent implements ExplorerManager.Provider {
    private ExplorerManager em = new ExplorerManager();
    public ViewerTopComponent() {
        setLayout(new BorderLayout());
        add(new BeanTreeView(), BorderLayout.CENTER);
        Children kids = Children.create(new SystemPropertyChildFactory(), true);
        AbstractNode rootNode = new AbstractNode(kids);
        em.setRootContext(rootNode);
        associateLookup(ExplorerUtils.createLookup(em, getActionMap()));
    }
    @Override
    public ExplorerManager getExplorerManager() {
        return em;
    }
    class SystemPropertyChildFactory extends ChildFactory<Object> {
        @Override
        protected boolean createKeys(List<Object> list) {
            list.addAll(System.getProperties().keySet());
            return true;
        }
        @Override
        protected Node createNodeForKey(Object key) {
            BeanNode node = null;
            try {
                node = new BeanNode(key);
                node.setDisplayName(key.toString());
            } catch (IntrospectionException ex) {
                Exceptions.printStackTrace(ex);
            }
            return node;
        }
    }
}

Here are the class annotations for registering the above in the Window System:

@TopComponent.Description(
        preferredID = "ViewerTopComponent",
        persistenceType = TopComponent.PERSISTENCE_ALWAYS
)
@TopComponent.Registration(
        mode = "explorer",
        openAtStartup = true)
@ActionID(
        category = "Window",
        id = "org.demo.viewer.ViewerTopComponent")
@ActionReference(
        path = "Menu/Window" /*, position = 333 */)
@TopComponent.OpenActionRegistration(
        displayName = "#CTL_ViewerAction",
        preferredID = "ViewerTopComponent"
)
@Messages({
    "CTL_ViewerAction=Viewer",
    "CTL_ViewerTopComponent=Viewer Window"
})

And here are the import statements:

import java.awt.BorderLayout;
import java.beans.IntrospectionException;
import java.util.List;
import org.openide.awt.ActionID;
import org.openide.awt.ActionReference;
import org.openide.explorer.ExplorerManager;
import org.openide.explorer.ExplorerUtils;
import org.openide.explorer.view.BeanTreeView;
import org.openide.nodes.AbstractNode;
import org.openide.nodes.BeanNode;
import org.openide.nodes.ChildFactory;
import org.openide.nodes.Children;
import org.openide.nodes.Node;
import org.openide.util.Exceptions;
import org.openide.windows.TopComponent;
import org.openide.util.NbBundle.Messages;

NetBeans Zone - The social network for developers - July 21, 2014 10:10 AM
NetBeans in the Classroom: Mandatory Methods for Beans (Part 3)

Ken Fogel is the Program Coordinator and Chairperson of the Computer Science Technology program at Dawson College in Montreal, Canada. He is also a Program Consultant to and part-time instructor in the Computer Institute of Concordia University's School of Extended Learning. Preview Text:  Regular NetBeans education columnist Ken Fogel, the Program...

Geertjan's Blog - July 21, 2014 07:00 AM
@TopComponentGroupRegistration

The recently held NetBeans Platform course in Leipzig has resulted in a very nice enhancement for the NetBeans Platform community. It can be read about here, by its author Daniel Koll, from Aachen:

TopComponentGroup mit Annotation

No worries if you don't understand German. All you need to understand is Java! 

To get started with this enhancement, do a checkout:

svn checkout svn://svn.code.sf.net/p/topcomponentgroupregistration/code/ topcomponentgroupregistration-code

You'll end up with a NetBeans module that defines a @TopComponentGroupRegistration, as follows.

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.CLASS)
public @interface TopComponentGroupRegistration
{
  /**
   * The module where the {@link TopComponent} is placed in, and where the Group will 
   * be placed in if it doesn't exist.
   * @return 
   */
  public String module();
  /**
   * The specification Version of the {@link #module()}.
   * @return 
   */
  public String specVersion() default "1.0";
  /**
   * The name of the Group, where this {@link TopComponent} will be placed.
   * @return 
   */
  public String group();
  /**
   * Value of the open Flag, in the Group Configuration.
   * @return 
   */
  public boolean open() default true;
  /**
   * Value of the close Flag, in the Group Configuration.
   * @return 
   */
  public boolean close() default true;
  /**
   * Flag, if the Group should be opened at startup.
   * The real state of the group is calculated via an or to all 
   * of these Items.
   * @return 
   */
  public boolean groupOpenState() default false;
}

There's also a LayerGeneratingProcessor included in the NetBeans module, to process the above. 

Copy both into a core module in your NetBeans Platform application, set the required dependencies (just copy them from the project.xml in the module) and then annotate your TopComponents as needed, as described by Daniel Koll.

Many thanks, this is very useful, and has qualified Daniel Koll as a NetBeans Platform Certified Engineer. This is a certification that is part of the NetBeans Platform Certified Training Course. Not only that, but Daniel has created another new feature, available as a plugin, ImportantFiles 4 JavaSE. Congratulations Daniel, looking forward to many more enhancements to NetBeans IDE!

NetBeans Zone - The social network for developers - July 18, 2014 12:17 PM
NetBeans Podcast 70 - Community Satisfaction

Podcast Guests: Ashwin Rao (NetBeans-Oracle), Ken Fogel (Dawson College, Montreal) Download mp3: 31 minutes – 26 mb Subscribe on iTunes Preview Text:  Senior Group Manager for NetBeans Product Management Ashwin Rao discusses how NetBeans satisfaction surveys benefit the community. Ken Fogel, creator of the popular "NetBeans in the...

Geertjan's Blog - July 18, 2014 07:00 AM
French, Polish, Dutch Updated Translations of NetBeans Platform

Mixing existing translations from the community translation project with new supplemental translations, as described here, we now have NetBeans Platform translations updated to Polish, French, and Dutch during the last few days:

French, by Constantin Drabo:

Polish by Sławek Mikuła:

Dutch by me:

If you want these translations as the basis of your own work, let me know in the comments to this blog entry. We're collecting the translations at https://java.net/projects/localized-netbeans, which is currently only accessible if you're a member of the project. We'll open the site soon so anyone can access it.

Even the above are not complete translations yet, we're just focusing on the visible texts that we see as we look through the menus, dialogs, etc, of the NetBeans Platform. It's a slightly haphazard process but better than nothing. Translators who complete the 'platform' translation, then start working on the 'ide' translation, which is a separate application on top of 'platform', followed by 'javase', etc, etc, one step at a time, until all of the IDE is translated.

Adam Bien - July 17, 2014 07:43 AM
Nashorns, Strange Practices, DI in FX and No Hallway Conversations--An Interview About my (=Adam Bien) JavaOne Activities

In the interview I said: "The JavaOne is the only conference, which I attend as a speaker" what I meant was: "...as an attendee". Sorry, but it was late :-).

Thanks Reza https://twitter.com/reza_rahman for the interview!

See also other screencasts at: http://tv.adam-bien.com or subscribe to http://www.youtube.com/user/bienadam.

See you at Java EE Workshops at MUC Airport or on demand and in a location very near you: airhacks.io!


Real World Java EE Workshops [Airport Munich]>

APIDesign - Blogs - July 17, 2014 06:51 AM
Japanese Translation is Real

Cover of Japanese translation of TheAPIBook. I am amazed, the book is about 30% shorter, yet is seems to contain all the content of the original one!

Image:PracticalAPIDesignInJapanese.jpg

Great work Yoshiki!

--JaroslavTulach 06:51, 17 July 2014 (UTC)

NetBeans Zone - The social network for developers - July 17, 2014 05:15 AM
NetBeans 8 — Shortcut to Remote Platforms (Part 3): Remote Platform Debugging

I created a series of quick intros to the NetBeans 8 Remote Platform feature. This clip shows how to remotely deploy, execute and debug an JavaFX application on a Raspberry Pi with NetBeans 8. Preview Text:  This article and video is part of a series of quick intros to the NetBeans 8 Remote Platform feature. This clip shows how to remotely...

Geertjan's Blog - July 16, 2014 09:16 AM
NetBeans Translation Tip #1: Page Setup Dialog

No matter what you do, you're unable to translate the "Page Setup" dialog, which is accessed from "File | Page Setup..." in the main menu of the NetBeans Platform. 

The reason for the problem is that the strings that you see above do not come from the NetBeans Platform. Instead, they come from the JDK, specifically, from rt.jar, where you'll find the following:

The above screenshot shows which languages are supported for the Page Setup dialog. Therefore, if you switch locale to "pl" for Polish or "nl" for Dutch or some other language not listed above... the English texts will be shown and nothing you do with properties files in the 'branding' folder in your NetBeans Platform application is going to change that.

But there is a solution.

  1. Get the source. Go here, i.e., the source of sun.print.resources.serviceui, and copy that source file into the NetBeans module for your language. Change the name of the class to include your locale, e.g., "serviceui_nl_NL.java" and, to help yourself later to understand why it's there, put it into the same package structure as the other files in rt.jar.

  2. Translate the texts. Then translate all those texts, e.g., the key "radiobutton.portrait" currently has the value "Portrait". Translate that word "Portrait" and replace the value with your translated word. Do the same for all the values in the file, of which there are about 150, I guess.

  3. Install the translation. Then create this class in your language module:
    import java.lang.reflect.Field;
    import java.util.Locale;
    import java.util.ResourceBundle;
    import org.openide.windows.OnShowing;
    
    @OnShowing
    public class PageSetupTranslator implements Runnable {
    
        @Override
        public void run() {
            ResourceBundle bundle = 
                    ResourceBundle.getBundle(
                            "sun.print.resources.serviceui", 
                            new Locale("nl", "NL"));
            try {
                Class cl = Class.forName("sun.print.ServiceDialog");
                if (cl != null) {
                    Field fld = cl.getDeclaredField("messageRB");
                    if (fld != null) {
                        fld.setAccessible(true);
                        fld.set(cl, bundle);
                    }
                }
            } catch (ClassNotFoundException ex11) {
            } catch (NoSuchFieldException ex11) {
            } catch (SecurityException ex11) {
            } catch (IllegalArgumentException ex11) {
            } catch (IllegalAccessException ex11) {
            }
        }
    
    }
    Reference: https://community.oracle.com/thread/1287832

  4. Check the module structure. You should now see the following structure in your language module:


Now, when you start the application, your "serviceui" class will be picked up and applied to the Page Setup dialog. Of course, when there are multiple such classes, as will be the case in the "LocalizeNetBeans" project, there'll be a problem because multiple of these files will be applied to the Page Setup dialog. Just disable all of them by commenting the @OnShowing annotation for all of them except your own during development and in production the user will only be using one language anyway and, if they need more, they'll switch to a different locale, restart their application, and then the class applicable to the locale will be applied to the Page Setup dialog.

Adam Bien - July 16, 2014 07:23 AM
Late Summer Java (SE,FX,EE) Hacks

  1. Munich Airhacks: From Java EE to HTML 5, 21st to 25th July: http://workshops.adam-bien.com
  2. Virtual: 5th, 6th and 7th Airhacks Q & A (each first Monday of the month at 6 P.M. (CET): http://www.ustream.tv/channel/adambien Temporary questions repo: https://gist.github.com/AdamBien/e1855469d4c507427ef9
  3. Hamburg: "Java EE Patterns and Best Practices", 11th-13th August, http://www.oose.de/training/java-ee-6-patterns-und-best-practices/
  4. Rapperswil: Java EE 7 + Java 8 Good Practices, 9th September, http://www.ch-open.ch/wstage/workshop-tage/2014/programm-2014/ws-1-java-ee-7-java-8-good-practices/
  5. San Francisco: JavaOne, 28th September, 9th October, "Enterprise Nashorn", Productive Java FX 8, Unorthodox Enterprise Practices and Java EE 8 Community Update and Panel"
  6. Munich Airhacks: "Java 8 with Java EE 7 or The Impact of Java 8 on Java EE Applications" http://workshops.adam-bien.com/java8.htm

Enjoy the summer of Java!


Real World Java EE Workshops [Airport Munich]>

NetBeans Zone - The social network for developers - July 16, 2014 05:15 AM
NetBeans 8 — Shortcut to Remote Platforms (Part 2): JavaFX on Raspberry Pi

I created a series of quick intros to the NetBeans 8 Remote Platform feature. This clip shows how an JavaFX application is deployed on a Raspberry Pi and remotely executed from NetBeans. Preview Text:  Intro to the NetBeans 8 Remote Platform feature: How an JavaFX app is deployed on a Raspberry Pi and remotely executed from NetBeans. This...

NetBeans Zone - The social network for developers - July 15, 2014 11:44 PM
NetBeans Weekly News (Issue #648 - July 14, 2014)

Community NetBeans Community Podcast 70 In this Summer edition, meet Ken Fogel, creator of the popular "NetBeans in the Classroom" article series; find out how to get NetBeans web content in other languages; and discover how the biannual satisfaction surveys conducted by the NetBeans team benefit the community. Preview Text:  In this issue: The...