Archive for the 'Java' Category

Webservice Interoperability

April 17, 2007

I’ve had the joy over the last few days of working with a developer to figure out why a Web-sphere web service won’t talk to a .NET web service. The Java team were saying it was a .NET issue, and the .NET team were saying it was a java issue. The culprit? The .NET web service didn’t like an XML declaration in the soap message from the Websphere service. Both the messages (with or without) conformed to the specifications however. Was good to get it all working and I learn’t alot about web services. I’d like to work more with them and will be making one of my own for something I’m working on.

I managed to collect a few good links on the topic:

Platform Interoperability: Sun ONE and Microsoft .NET, Achieving Asynchronous Communications

Web services programming tips and tricks: Improve the interoperability between J2EE and .NET, Part 2

Improving Web Service Interoperability

IBM WebSphere Studio and Microsoft .NET Working Together — Part 1

Sun Opens Java

November 14, 2006

The day has finally come :), Today Sun has released Java under the GPL open source license. Combined with the new JDK 6 I expect we will be seeing some great things coming out of the Java shops, very exciting!

This is one of the best steps Sun has done since changing their licensing to allow Linux distributions to ship with a JDK.

Sun Opens Java

Self-returning methods

August 15, 2006

I was reading a post titled Avoid a void at on the subject of using self-returning methods in an API. A very good and informative read (the author has quite a humorous writing style too).

There was a comment on the post linking to an article called Java theory and practice: Enable initialization atomicity at IBM developer works. This is a more detailed article on self-returning methods or ‘the self-return idiom’ complete with examples and is very well written.

Something to consider when designing methods as not only can it improve your own readability it can also be very productive as represented by the single statement examples (no temporary variables).

Java based RSS reader

August 12, 2006

As regular viewers will know I have been wanting to make a RSS reader for some time, mostly because it is something that interests and will be a great learning experience.

I have decided that I will do it in Java/Swing, and not delphi as originally intended. I want it to be as portable as possible and want to extend my java knowledge as this is the type of job I will be looking for next year.

That plan of attack is to use a JEditorPane and send a ‘chunk’ of xml (parsed) to it via a stylesheet to be viewed. For example I will have a tree on the left with the subscribed feeds, expanding a feed will display each topic in the feed, clicking that topic will then display the contents for that topic in the JEditorPane, as html via XML/XSL conversion.

This is somewhat to compensate for Java Swing’s embarrassingly lacking HTML/XML rendering components.

I read the article: Sun should Open Source Swing: what is bad for Gosling is good for propaganda over at O’REILLY, which echos my view. Very well written and informative article.

As per suggested in the article I may look for an opensouce XML rendering component at JavaDesktop instead of using the JEditorPane.
Either way, I’m looking forward to getting this up and running!

Java Quotes in strings

August 10, 2006

Another one of those small things that trip you up every now and then (I always seem to forget when I need it), is having a string with quotations within it in a language such as Java. Here is how its done:

To have quotations within a string use the backslash \” before the quote.

String hello = “Hello \”Hello\” Hello”;

would produce Hello “Hello” Hello.  I think this format is used across many languages but I’m not too sure on that.

Farewell Delphi!

June 29, 2006

I came across a great farewell to Delphi tribute over at while browsing Roumen Strobl from NetBeans Weblog.

A snippet as featured in Roumen’s post:

Oh they didn’t write Skype in Javascript
Or Scheme or other Lisp.
And they didn’t use Java or that C sharp
‘Cos it had to be fast and crisp.
And they didn’t write Skype in C++
Though they wanted it tough and tight.
And they didn’t write Skype in Vis Bas
Cos Vis Bas is just shi ain’t quite right.

And Delphi, your easy to use programming environment and lack of runtime dependencies , are going to be greatly missed 😦

McKoi SQL Database for Java

June 13, 2006

Java programmers may be interested in this, from the website

Mckoi SQL Database is an SQL (Structured Query Language) Database management system written for the JavaTM platform. Mckoi SQL Database is optimized to run as a client/server database server for multiple clients, however it can also be embedded in an application as a stand-alone database. It is highly multi-threaded and features an extendable object-oriented engine. 

McKoi is released under the GNU General Public License and supports the SQL standard to a comparable level of other SQL database management systems available (see McKoi SQL Syntax). McKoi supports similar data-types to mySQL but with the addition of JAVA_OBJECT , allowing a serializable objects in Java to be stored.

I couldn't find any mention on if McKoi supports referential integrity which the default database engine in mSQL does not. Not really that big a deal if you design your appication to implement these features itself.

This will be the first thing I will be playing with in the holidays as it looks very useful! – fresh links for developers

June 11, 2006

I've been meaning to link for ages, very slack of me! A brief description from the digg article is below: (DZ) is a link-sharing community where member participation determines what gets published and what does not. Members submit links to developer-related content into a queue, and you vote to indicate whether or not you like those links. A must read for developers CS pros and hobbyists.

I could spend all day reading articles there (and proberly will over the holidays 🙂 ) Support them by signing up and digging the article! 

Java Layout Managers and Google Notebook

May 31, 2006

First of all,lack of updates recently … I have about 3 weeks left before end of semester and lots of assignments due so havn't had as much time for anything other than study at the moment. I'm handing another in soon and quite on track with the rest so will be able to update more frequently again, and on with the post….

Anyone that has made a GUI application in Java I'm sure will agree that it is extremely hard to get a nice layout. If you are using a text editor it involves heavy use of the GridBagLayout as well as mixing layouts within panels etc. And if you are using an IDE they are often cumbersome, generate awkward or propitiatory code and do not export to other IDE's easily.  I came across the Zone-Layout Manager which appears to address these issues and provides a good open source code based alternative. Definitely worth checking out if yor are a Java programmer. You can see a well written and detailed comparison here

I have installed Google Notebook and have found it useful already. Google Notebook allows a block of text to be selected and instead of copying you can choose the left mouse click option of 'Note this' which adds the selection to the notebook with the URL of the website. The notebook can be opened and viewed/edited at any time by clicking its icon in the bottom right hand corner of FireFox's status bar. A highly recommended plug-in for FireFox.

Java Java Java

May 26, 2006

I have spent all day trying to get my java application (just a test application) to connect to MS SQL server 2003 from a Linux box. My code compiles and I am using the jTDS JDBC driver which allows me to connect to the server without having to use the ODBC-JDBC driver which is buggy and not recomended for production use, although it is fine for the prototype I am doing. I am getting ClassNotFound exceptions so I'm obviously setting up the driver wrong.

Among my travels I did come across The DocBook Project. Looks like it would be very useful for documentation I plan to start using this soon.

I was also going to add a music page to my blog today with some of my personaly picked essential albums and artists to look out for. I'll proberly end up doing it tomorow now as the Java stuff took much longer than expected!

I really should update my about me page too!