Friday Oct 17, 2008

NetBeans 6.5 Beta quick tip

Here's a quick tip that might help people using NetBeans 6.5 beta. When I tried to run an application from within the tool I got a stack trace with the message: "Absent code attribute in method that is not native or abstract". If I tried to run the application outside NetBeans using the generated jar file everything worked fine.

Googling the error message turned up a lot of results related to some stubs jar files in Maven which clearly was not related to my problem.

Further searching led me to a forum entry in German, the crux of which was that this was a bug in the compile-on-save functionality. To fix this you simply need to right-click the project you're trying to run and select properties. In the Compiling section under Build there is a check-box for "Compile on Save". Deselect this and voila! the application runs without problem.

Thursday Jul 31, 2008

Today's the day

Well, I've done a lot of presentations over the last fifteen months on JavaFX, so it's really nice to see the SDK preview launched today. Clearly, we still have lots to do to make sure that all developers and content creators have all the tools they need, but this is a significant (and very important) first step.

Time to get cracking on some entertaining new demos, especially linking this to my multi-touch screen from JavaOne.

Monday Aug 13, 2007

No Fluff, Just Stuff

The "no fluff, just stuff" conference has been around for a while, but until now it's always been in the US. The first European event is happening August 29th-31st, here in London; more details can be found here. I'll be presenting on JavaFX and in keeping with the theme of the conference I'll be digging into the syntax of JavaFX script as well as the libraries and tools for developing applications.

If you're interested let me know and I can provide a promotion code that will get you £100 off the registration fee. Hopefully see you there.

Friday Jul 13, 2007

Return to academia

Yesterday we held an event at the Customer Briefing Centre in our London City office. This was extremely well attended, to the point that we were probably on the verge of breaking fire regulations. A hundred and ten people in a room that really should have held a maximum of ninety and I was very grateful that the rather temperamental air conditioning decided to work. There seemed to be a lot of interest in both Java FX Script and Real Time Java. Now that the real time JVM is available running on top of Solaris (rather than the bespoke systems that were used originally) I'll definitely be digging into this with the idea of using it in some kind of interesting demo, possibly also involving the Sun SPOTs. Sadly, the demo gods were not looking favourably on us yesterday as my Minority Report Sun SPOT demo decided not to work. I think Matt had a harder time than me given that he needed to reboot his laptop during his presentation and did his best to fill the void whilst the screen was blank.

In the afternoon I went over to Imperial College to attend their Inaugral Workshop at the Centre for Pervasive Sensing. This was very interesting, as I'd not attended a proper University lecture in a long, long time. Some of the work went rather over my head, but I did find a lot of what was presented fascinating, especially the work on power scavenging for small wireless sensor devices using all types of movement, including someone just walking around or moving their arms. Maybe it's time to start thinking about going back to university.

Tuesday Jul 10, 2007

World's largest Java conference in Malta

The first Sun Java Developers conference in Malta last week was a huge success. In fact, so much so, that I would say that it was the world's largest Java conference, ever. Obviously the fact that we had 305 people attend means that in absolute terms JavaOne, JavaChina and the recent Indian TechDays still hold the record for number. However, think of it a different way. According to the last census (about 18 month ago) the population of Malta is 404,079. That means that one in every 1,325 people in the population turned up for this event. Extrapolate this to the UK (based on the number from the Office for National Statistics) and you'd have an audience of just under 45 and a half thousand people. I think that we'll definitely be doing more events in Malta.

I had the 'pleasure' of flying out of Terminal 4 at Heathrow on Wednesday last week and I was really, really glad I was flying Air Malta. Terminal 4 was complete and utter chaos with, at a rough guess, over a thousand people queuing up outside the terminal, since a number of incoming BA flights had had to be canceled the previous day due to the security alert and evacuation. Frankly, had I been flying BA I'd have just gone back home again. As it was I was able to get into the terminal with only minimal hassle. Getting through security was actually quicker than normal since there were less passengers flying that morning.

Thankfully I don't have any travel planned until September which means I can relax a bit.

Tuesday Jul 03, 2007

Hello. Is there anybody in there?...

"...just nod if you can hear me. Is there anyone home?" Lyrics from Comfortably Numb by Pink Floyd. The words are very apt for my morning, although I wish the title were. British Airways customer service is not going up in my estimation at the moment. I did finally manage to speak to someone at their baggage tracing centre yesterday, who confirmed the details they already had and informed me that one bag had been located. I'm now waiting to see if, and when this will be delivered. Since the other bag is still shown as "Tracing in progress" I have been trying to call again today and all I get is the message saying we're so busy we can't even put you in a queue to wait for a representative. I tried phoning their dedicated customer service line and got the same result.

I'm leaving for Malta tomorrow where we'll be running our first Developer Day there. If you're in Malta and in the IT business please come along as we've lots of interesting things to talk about. Sadly I won't be doing as many demos as I'd planned unless there's some kind of divine intervention and BA manage to find and return my bag today, since that has all my Sun SPOTs in it.

Friday Jun 22, 2007

Mobile Monday, the German way

I was in Dusseldorf on Monday evening to talk at an event called Mobile Monday. This was an evening event with short presentations from various company's (Nokia, Vodafone, Siemens, etc) and then discussion over a few beers about what was happening in this market. I talked about what Sun are doing for the future of mobile Java explaining the Mobile Services Architecture, MIDP 3.0 and Java FX Mobile (as just announced at JavaOne). There was some lively discussion afterwards, especially around what impact the iPhone might have and competing technologies like scripting languages. All good fun.

It's been a while since I've been to Germany so I wasn't quite ready for the taxi ride from the airport. I got into my Mercedes E class taxi (yep, that's just a normal run-of-the-mill taxi, not a limo) and off we go. Watching the speedo hit 160kmph I remembered that the good old autobahn has lots of sections where there's no speed limit. Apparently the recommendation of 130kmph doesn't hold much sway with taxi drivers.

Next week I'm off to Zurich for Jazoon where I'm doing a Sun SPOT presentation on Monday afternoon and then Tuesday evening it's off to Barcelona for The Server Side Java Symposium. I'll be doing the Sun keynote demos along with Eduardo Pelegri-Llopart. I'm really looking forward to going to Barcelona, as it's been a long time since I was last there and there's my all time favorite tapas bars, Txapella. I'm just wondering how many times I can go there in the three days we'll be there.

Monday Mar 12, 2007

London Tech Days

It's been an incredibly busy few weeks and not getting any less so at least until after Java One. Lot's of very cool and interesting stuff to work on plus, of course, a variety of Tech Days. I was in India a few weeks ago for what was the biggest developer event there ever (and that's saying something). Over 4,000 developers for day one at the venue in Hyderabad and nearly 3,000 more at satellite locations. Very, very busy, millions of questions, but hugely rewarding.

This week it's the Tech Days in London, which for me means I get to sleep at home rather than spending yet more time in a hotel. There's still time to register; there's a NetBeans and Solaris day tomorrow and then two days of packed technical sessions and hands on labs Wednesday and Thursday. We even have James Gosling doing the keynote on day one. What more could you want?

Hopefully I'll see you there.

Tuesday Jan 30, 2007

A victory for common sense

Software patents are a particularly contentious issue with many large companies being vehemently opposed to the idea, whilst others are spending a lot of time and effort to patent everything they can think of.

Last week there was considerable discussion about a patent that Microsoft applied for. This patent was for an "object test bench", which was included in the Visual Studio product. Unfortunately, this idea had been used previously in the excellent BlueJ project which provides a simplified IDE for teaching new students the ideas of OO programming using Java. You can read the full story here.

Thankfully, according to Dan Fernandez, who is Lead Product Manager for Visual Studio Express, Microsoft will be withdrawing their application.

It's great to see that sometimes plain common sense can prevail.

Friday Dec 22, 2006

Java everywhere

Quite literally...

Check out the other wonderful Java powered bathroom accessories here.

Tuesday Dec 19, 2006

Javapolis afterthoughts

I spent last week in Antwerp at the great Javapolis conference. It's really quite amazing to see the size and quality of this conference when you think that it's all organised by people who don't do this as their day-job, they do it in their 'spare' time. Congratulations and thanks to Stefan and all the other organisers of this event.

I did some demos during the Sun keynote along with my colleague Angela Caicedo. We used the Sun SPOTs to show some cool uses of Java with things like Angela's dataglove controlled 3D sudoku game and good old Looking Glass and my SPOT powered tag playing robots. Thankfully my demo worked without any hitches, which considering I was still tuning the code until the small hours of the morning the night before I left, I was was very happy about.

I also helped out with some hands on labs, so didn't get to attend as many sessions as I'd hoped. One that I did enjoy was Neil Gafter's talk on continuations. You can watch this yourself here. This is stirring up quite a lot of discussion amongst a number of Java people. I need to think about this a bit more, but I certainly like the principal of the idea.

Antwerp is a noce place except for one major flaw: the one way traffic system. I decided to drive to Antwerp using the Eurotunnel so also had to drive when in Antwerp. Basically the one way system seems to make it almost impossible to get to certain places. On the second day I left for the conference venue and decided to take what I thought would be the most direct route (having failed to do this on day one). I carefully looked at the map and planned exactly which way to go. Sadly the one thing the map really needed was missing, i.e. which roads go in which direction. I drove for 20 minutes (the conference centre was only ten minutes drive from the hotel) until I found myself going past the hotel again!

Oh well, it's almost the end of the year so time to start thinking about turkey, stuffing and Christmas pud.

Thursday Nov 09, 2006

TechDays in Europe

Well, it's been way, way too long since my last blog entry, so I've decided to make an effort and start more regular blogging again.

Next week I'll be in the beautiful city of Prague for the TechDays. There's still time to register and it should be both informative and fun. In addition to the main TechDay events there's also a NetBeans day and an Open Solaris day.

Elaine and Dylan will be travelling with me, so despite it not being Dylan's first trip abroad (he's already been to Italy and Ukraine), it will be his first TechDay. I figure five months is about the right age to start his IT career.

Wednesday Apr 12, 2006

Brazil TechDays, Day 1

Yesterday was day one of this year's Brazil TechDays. We're in a different venue this year which is good as it's huge. It needs to be, as we had nearly 1500 people turn up yesterday. Jonathan Swartz was the opening keynote and then Jeff Jackson explained more about our tools and platforms strategy.

I had a busy day doing a Solaris session, a session on the new Concurrency utilities and a session on managment and monitoring in Java SE 5. This in addition to helping out with one of the hands on labs and taking part in the demo shootout (which we lost).

By the end of my day, my voice that had been threatening to give out since first thing on Monday really was on its last legs. Thankfully I made it to the end of the sessions.

Dinner was yet another churascaria, four in four days is about my limit; thankfully tonight we're going to a different type of restaurant.

Monday Dec 05, 2005

Fun with DTrace and Java

I've been playing with the JVM DTrace provider for the last few days and looking at ways of integrating output from this into the DAVE graphing tool that Jon Haslam and I have been working on.

Anyone who's used DTrace knows how cool it is. Once you get used to the scripting style, i.e. remembering that each clause gets executed in the order they are declared in the script and that the flow control is much more like AWK than C you can get going pretty quickly. Here's a script I put together that will track all the method calls made when a particular method is called

#!/usr/sbin/dtrace -s
#pragma D option quiet
#pragma D option bufsize=100m

self int in; /\* This thread \*/
self string caller[int]; /\* Method call stack \*/

 \* Initialise variables
  depth = 0; /\* Current depth in method calls \*/
  max_depth = $2; /\* Maximum depth to trace method calls \*/
  trace_method = $$3; /\* The name of the method to trace \*/
  deepest_call = 0; /\* Deepest call made \*/

 \* Entering any method where the call depth is greater than we want to
 \* trace. To ensure that the returns match up we still need to increase
 \* the current call depth
/self->in && depth >= max_depth/

 \* Entering a constructor. Since we always get as the method name
 \* we replace it with the class name to provide proper identification
/self->in && copyinstr(arg1) == "" && depth < max_depth/
  printf("\\t\\"%s\\" -> \\"%s\\";\\n", self->caller[depth], copyinstr(arg0));
  self->caller[depth] = copyinstr(arg0);

 \* Entering a method which is not a constructor
/self->in && copyinstr(arg1) != "" && depth < max_depth/
  printf("\\t\\"%s\\" -> \\"%s\\";\\n", self->caller[depth], copyinstr(arg1));
  self->caller[depth] = copyinstr(arg1);

 \* Track the deepest call made
/self->in && depth > deepest_call/
  deepest_call = depth;

 \* Method call that starts the trace. This is placed last in the list of
 \* method-entry clauses so that this is the only one executed when we start
 \* the trace
/self->in == 0 && copyinstr(arg1) == trace_method/
  depth = 1;
  self->in = 1;
  self->caller[depth] = copyinstr(arg1);

 \* Return from the method we're tracing. Terminate the trace
/self->in && copyinstr(arg1) == trace_method/
  printf("Trace finished, max call depth was %d\\n", deepest_call);
  self->in = 0;

 \* Return from a method. Decrease the current call stack depth

To execute this you need either to be logged in as root or have the dtrace_kernel, dtrace_proc and dtrace_user privileges. The script takes three arguments: the first is the pid of the JVM you want to trace the method in; the second is the maximum call depth you want to go to; and the third is the name of the method to start the trace. The JVM being traced must be started with the argument -Xrundvmti:methods to enable the DTrace provider.

It's amazing how many methods get called in a Java application (many of which you, as the developer, are completely unaware of. To test this I used the DAVE GUI and just tracked the method call to display the next function in the sequence. The maximum call depth was 40. If I let the script generate all the output I got a file of 147MB. I couldn't even vi that and when I tried to put it into DAVE I just kept getting OOM errors or insufficient swap space. Even limiting it to 9 levels of method call generated the following graph (click on the image to see the fullsize version which is rather large).

Also, the impact on performance of using the DTrace provider is quite noticable (well, tracking every method entry and exit when there's 4.6 million of them, as there were for that one button click, would place a greater load on the system).

I'll keep looking into this to see how usable this can be made as a general purpose Java analysis tool. Ideally I'd like to integrate it into NetBeans so you can also look at the source code for the different methods.

Tuesday Nov 01, 2005

How did I get here moments

The last couple of weeks have given me a couple of moments when I've suddenly thought, "How exactly did I get here?" This is not a geographical based question since the answer would be car, plane, taxi, etc. No, this is more of a philosophical question about the sequence of events in my life that led me to that point. Some examples:

  • When I was in Singapore a few weeks ago we were returning from a restaurant and there was a long queue for non-existent taxis. Since there was a chap with a cycle rickshaw and the hotel wasn't that far away we opted for the eco-friendly alternative. At the first set of traffic lights the driver stopped, hopped off the rickshaw and started up the in-rickshaw CD player. Being peddled through the streets of Singapore to the sounds of Elvis is truly quite surreal.
  • Next up was a couple of weeks ago when I went to Newcastle to do talk at a Regional Development Agency organised event. Since I was there the PR agency managed to get me an interview on the local radio station, BBC Radio Newcastle. They have a blue bus that travels around the local area acting as an internet cafe, outside broadcast and general place of interest. When I arrived it was parked on a community farm down a muddy track. I got out of the taxi and hopped on the bus. It was full of three year olds who had come to see the animals (including the very large pig in the field next to the bus). Not my normal audience, but the interview went well and was great fun.
  • Finally, there was last week when I was in California. I had received an e-mail a couple of weeks back from some students at Ocala Middle School, who were interested in voice controlled robotics. They had done a Google search, and found my name. I arranged to go to the school on Friday morning to talk to them about robotics and show them my LEGO Mindstorms powered robots including the Blackjack player. Although I must confess to being more nervous than usual the event went extremely well and I was really impressed by the understanding that the students had and how they were able to answer my questions.

Next week its back to my usual audiences with some events in Brazil including another visit to my favorite Java User Group, DFJUG, in Brasilia. Of course, it's also another chance to eat lots of great Brazilian meat.




Top Tags
« June 2016