Monday Sep 28, 2009


Add the recently released Samsung Instinct HD (available exclusively on Sprint and available now at Best Buy) to the growing list of JavaME consumer devices. This device is pretty special though. Why? Because it's the first device to combine the two JavaME stacks (CDC and CLDC) and to include OSGi into the mix. This device has an OSGi implementation running on top of a CDC stack, and running MIDP on top of OSGi. The application model generally used on the device is MIDP, but at some point it could allow running other OSGi applications and CDC applications as well. There's a lot of capability built into this phone.

Monday Jun 15, 2009


If you missed JavaOne this year, possibly due to the economic downturn and the ever tightening of corporate belts, do not despair. The technical presentations presented at JavaOne are now available to Sun Developer Network members (this membership is free) here: 2009 JavaOne Technical Sessions. If you missed the keynotes, you can view replays of those here: 2009 JavaOne Conference. Granted, you don't get to mingle with other Java developers, but there's lots of good information in the presentations and contact information if you want to get more information on a particular presentation. It's the next best thing to being there.

Wednesday Jul 18, 2007

Not long ago I needed to create some web pages which were tied to a database. Not being an expert in creating Web applications, I decided to take a stab at using NetBeans and the Visual Web Pack to create some web pages. All I have to say is Wow. I created a new Visual Web application, created a few web pages, created a database connection, added a bunch of design elements including connecting some fields to database columns, added some page navigation, and built and ran the application (NetBeans automatically deployed the application to one of the included servers), all within minutes and all graphically. While this is no customer-facing Internet-ready application, I don't think it's too far off. It amazes me how much functionality can be created so easily in such a short amount of time.

Thursday Feb 15, 2007

The JavaOne Session Preview is now available online. What is cool about this is that Sun's Eco group has calculated these statistics in providing this document online rather then sending out a paper hard-copy:

By producing this piece virtually, the Eco group has calculated the savings Sun has made:
  • Assuming (based on last year) the document is equivalent to 2.5 pages of 0% recycled copy paper
  • Total paper saved = 4.63 tons
  • Greenhouse Gases reduced (CO2 equivalents) = 13 tons (26,297 lbs)
  • Reduction in wood use = 13 tons
  • # of trees saved (assuming 1 tree makes 16.67 reams of copy paper or 8,333.3 sheets) = 111
  • Reduction in wastewater (and associated water pollution) = 78,616 gallons *(equivalent to 838K cans of soda)*
  • Reduction in solid waste (stuff sent to landfills) = 5.1 tons

Regardless of how it's delivered, this is your first chance to see what's happening at this year's JavaOne.

Thursday Nov 02, 2006

In case you haven't had a chance to look at the NetBeans website lately, NetBeans 5.5 has been released. This release includes not only an improved NetBeans product, but also the Mobility Pack for CDC (Beta 2), the Mobility Pack for CLDC, the C/C++ Toolkit Beta 3, Subversion support, the Visual Web Pack (Creator) Technology Preview , the Enterprise Pack (with UML modeling), and more. For those interested, the website has been completely re-designed as well.


Tuesday Jul 18, 2006

I've found from talking to many people that it isn't common knowledge that you can split a window in NetBeans. That is, displaying multiple editor windows at a time by dividing up the display. You can split windows horizontally and vertically, just like any good editor or IDE. This is very easy to do in NetBeans.

To split a window horizontally, you simply click and hold the mouse button on a tab at the top of the editor and drag it to the bottom (or top) area of the editor. As you do this, you'll see an outline of where the window will be placed. Let go of the mouse button and the window will split and display at the bottom. You can then click and drag the area between the bottom window's tab area and the top window's status bar area to resize the window.

To split the window vertically, do the same thing as above, except drag to the right (or left) side of the editor window and let go. Again, you'll see an outline letting you know where the window will be placed.

You can continue to do this and keep splitting windows as you like. Of course, with the amount of space the window takes up (tab area, toolbar area, status bar area, etc.), you're real estate diminishes quickly. BTW, you can get rid of the toolbar to free up more space (right-mouse click on the area to the left of the edit window and de-select 'Show toolbar').

You can add multiple files to the split window as well. Just make your first split, then drag and drop a second tab into the middle of the target split area. The file will be added.

To get rid of a split, drag a tab from the split area back to the middle of the main area. The file will be moved to the main area. If the file is the last one in the split area, the split will disappear.

You can also view different sections of a file at the same time. Simply right-mouse click on the tab of the file and choose 'Clone Document'. You'll see another tab show up with the same name. Then use the cloned window to split the window. You now have the same document displayed side by side. You can scroll both windows independently.

Wednesday Oct 19, 2005

A good programming editor will help you get your code written faster. There are many ways editors do this. One way it to make it easier to write often written and long, hard to type code. NetBeans helps you write your code faster in several ways. In particular, NetBeans's code templates feature helps you write hard to type, lengthy code faster.

Code templates are short menmonics which can be expanded to code. For example, if you open a Java file in NetBeans, go to an empty line, and type 'sout', then hit Ctrl-Space, NetBeans will expand this to 'System.out.println("");' and place the cursor between the two double quotes. System.out.println is an often-used line of code and typing 'sout Ctrl-Space' is much easier then reaching for the () and " keys. 'fori', for a for loop, and 'En' for Enumeration are also useful. You can also create your own code templates for lengthy code you may be using in your project. This may include classes, method calls, exceptions, and comments.

To modify code templates in NetBeans 5.0, go to Tools->Options->Editor->Code Templates. There you'll see the list of code templates for each language supported in NetBeans. You can add, modify, and remove code templates to suit your needs

Wednesday Sep 28, 2005

NetBeans 5.0 beta is now available. The new features in this version are great, they really increase programmer productivity. This new version is also fast. I'll give you more details on it in the coming days, especially some of the new cool features. Congratulations NetBeans team!

Wednesday Aug 31, 2005

It is often the little things that can really make a difference. For those of you who may not have noticed (because it is very subtle), when you're editing a Java file (actually, any supported file) in NetBeans, a vertical text limit line displays in the edit window. I thought it was an artifact of a bad monitor. It's a faint pink line which shows you where your text limit is based on your editor settings. Maybe it's because I come from Emacs, but I continually look at the column number my cursor is on to make sure I don't go over this line. I hate it when you bring up an 80 column editor and you have line breaks all over the place. It makes the code more difficult to read. You can change your text limit and the color (I changed mine to a darker shade of pink...it stands out more) of the text limit line in NetBeans by going to 'Tools', 'Options'. The Options dialog displays. Navigate to the 'Editing', 'Editor Settings' and highlight the 'Java Editor' section. At the bottom of the options, you can change the line color, select if it is displayed, and change the number of characters which is your text limit.

Friday Aug 26, 2005

It's amazing what you can learn while doing the wrong thing. I was working on my project today in NetBeans 4.1. I *thought* my edit window had the focus, so I started typing. Lo and behold, I see this small 'Quick Search' window popup in my Projects window (the window which really had the focus). Intrigued, I entered a filename and hit the 'Enter' key. NetBeans did a search in the Projects window and took me to the file. Cool! I don't know all of the windows in which this works, but it works in the Favorites, Projects, Versioning, Runtime, and Navigator windows.

Friday Aug 19, 2005

Hero Craft has launched a game for your J2ME phone named Black Shark. The premise of the game is a Russian special forces officer is mining uranium on a remote island to develop weapons of mass destruction. It is your job to steal a KA-50 "Black Shark" helicopter to stop him.

Friday Aug 12, 2005

We recently went through the process of scrubbing our code, that is looking for comments in the code which shouldn't be in a released product. The comments generally start off with FIXME, TODO, and XXX, although they can include anything (I usually start mine with my login id. That way I know its my comment). NetBeans has a couple of tools you can use to easily find all of the 'notes to self' in your source code. The first is the 'To Do' window. If you go to the Window menu, you can select the 'To Do' window (Ctrl-6 for you keyboarders). Once selected, you'll see a window display at the bottom of the NetBeans window which takes the entire width of the window. You'll see 'Current File', 'Opened Files', and 'Selected Folder' tabs. If you have any notes in the file which currently has focus, you'll see them listed. You can select the 'Opened Files' tab to see a list of all of the notes in all of the files which you have open. You can also select the 'Selected Folders' tab and specify a folder. Doing so will give you a list of all the files in and beneath that directory which contain notes. Double-clicking on any line will take you to the line in the correct file. BTW, you can also specify custom text as being 'notes'.

Another tool is the Error Stripe. I recently installed this cool tool by updating my NetBeans 4.1 installation. This displays a vertical bar along the right side of the text editor. If all is well with the current file your displaying, you'll see a small green square at the top of the Error Stripe indicating everything is OK. If you see a red square, you have errors in your file . You can hover the mouse over the square and a popup indicating the number of errors is displayed. If you have errors (e.g. cannot find symbol), you'll see red horizontal stripes in the Error Stripe. If you see a blue horizontal stripe, this indicates you have a note to yourself. The Error Stripe displays these dispersed up and down the Error Stripe to give you and indication of how far down the error is. If you move the mouse over a stripe, the cursor will change to a pointer. You can single click on the stripe and NetBeans will take you to the issue. The Error Stripe gives you a good visual indication of issues with your file.

Thursday Aug 11, 2005

Opera has done a real good business making money shipping "commodity" browsers. In fact, I recently read an article in Business 2.0 on Opera and how well they're doing selling browsers for small devices. They recently annouced their Opera Mini Browser for J2ME enabled devices. What makes Opera Mini different from the Opera Mobile Browser is that Opera Mini gets its web pages from a remote server, which pre-processes the web page before sending it to the device. This makes your web experience better because you don't spend more money shipping across a lot of information you don't need on a small device and you don't waste your time trying to decipher a web page targetted for a desktop while browsing on a mobile device. Upon looking at the FAQ's, I noticed that they don't list specific devices in their requirements list, only that the device support Java and GPRS Internet connections. This is a real testament to the power of the Java platform's Write Once Run Anywere feature. With all of the various mobile devices out there, Opera only needs to write their browser once in Java. Opera states the browser is free, but you need to access it through your operator...and by the way, it's only available in Norway right now. I hope this provides a better surfing experience then I currently have on my mobile device.

Wednesday Aug 10, 2005

Recently, the Apache Derby project (a sub-project of the Apache DB project) went from incubator status to project status. This occured in part because Sun voiced backing for the project and is committing people to work on the project. To be a full project, not an incubator project, a project needs to have backing from more then one vendor. For those of you who don't know, Derby is a database, written entirely in Java, and was submitted to the Apache Software Foundation about a year ago by IBM. Derby came from IBM's Cloudscape acquisition. It looks like Sun will use Derby in various Java technologies. Considering Derby is designed to be an embedded database, and not a "database server" ala Oracle's flagship product, I think it will have some good applications in the J2ME CDC space.

Tuesday Aug 09, 2005


EA Sports is close (October) to releasing FIFA Soccer 2006 on J2ME phones. I read this article which statest the graphics on this game are pretty amazing. You can pick from 32 international teams using full rosters. You can pick your 11 starters and make adjustments during the game. Play mimics the console version fairly closely, but to play you'll need both hands (probably the right thing to do when playing a more involved game). You can "pan the camera" and even save parts of a game for replay. Although I'm not a soccer fan, this game looks pretty good.

This blog copyright 2009 by dmocek