Saturday, January 19, 2008

Ubuntu-7.10 is now my default operating system

Finally done it.
After many days of reading articles about installing ubuntu alongside windows xp, i finally managed to do it today.

I first heared about ubuntu from a friend who gave me a free ubuntu 5.* cd.
I explored ubuntu then from it's live cd environment and quite liked it.

But i couldn't explore further, as all i had was a laptop given by my office. So i didn't want to risk my job by installing ubuntu (hi hi..). But ever since i bought a notebook this christmas, i just couldn't control myself.

I had a ubuntu-7.04 live cd, but that cd couldn't boot properly in my notebook and i thought of downloading the "iso" cd image and burn it to a cd. That didn't work either (for me, atleast).

Then, i ordered for a free 7.10 live cd and got it last week. Later, as i was reading some articles about installing ubuntu alongside windows, i got afraid that a improper install might corrupt my system.

So, i thought of taking a safer route by installing ubuntu using microsoft virtual pc. So I installed ubuntu using virtual pc. This exercise actually helped to understand a lot of about installing ubuntu in particular.

Later, i thought of making a final attempt of installing ubuntu alongside windows xp. Contrary to my expectations, the installation was much much smoother and simpler than i expected. The installation completed in less than 20 minutes in my case.

Wow....i felt very happy at the end.

Whenever my ubuntu boots up, i see it with a sort of pride.

I will share my installation experience shortly...

Bye for now.

Thursday, January 17, 2008

Hot news...Sun to acquire MySQL

To learn more, please read my post in javalobby here

Sunday, January 13, 2008

Java Web Development with Eclipse 3.3

Hi all,
Blogging after a long....break. I was travelling a lot for the last 1 month or so. I went to Singapore, Putrajaya, Malacca to name a few. And as a result, very little time for blogging.

If you are following my blogs, i blogged sometime back about core java development using netbeans 6.0 and eclipse 3.3.

Both are excellent open source IDEs that have their own strength and weakness.
I've been using both netbeans and eclipse and i'm pleased with both of them generally.

Before the advent of version 6.0, netbeans was not on par with eclipse for core java development. The responsive editor, fast code completion, incremental compiling etc, etc.. were some of the trademark eclipse strongholds which netbeans never managed to enter, leave alone capturing.

But with 6.0, netbeans has made really a very huge stride in the areas which where it's traditional letoffs.

Eclipse 3.3 has also made some huge improvements in many areas, like it's support for Java EE 5 development, etc.
I also heard that the WTP project in eclipse has improved a lot over these days, so i thought of giving it a try.

My environment:
Eclipse 3.3 Europa
JDK 1.6.0_03
Tomcat 6.0

So i thought of refreshing my servlet/jsp/jsp-el/jstl skills in the above mentioned environment.

One thing that impressed me is that eclipse, by default, supports many popular application servers/web containers than netbeans does.
There is support for all versions of tomcat, jboss (even for 5.0), websphere (ofcourse dude) and also JOnAS server.
But how come they can leave out glassfish, which is the reference app server for java ee 5?
(I heard that glassfish team has released an eclipse plugin. But i expected more from the number one java ide)

One thing i missed though, is a separate menu item to configure "servers". That's ok.

Then i started churning out a few servlets and jsps in my sample app. I changed the web.xml a few times (to configure servlet init parameters etc)
All was going well until i got an "out of memory exception". The IDE displayed a window which suggested me to close the workspace.


Click the image to enlarge






This is what is i saw in the task manager, when the ide ran out of memory



That was ok with me. I was changing the web app many times and was redeploying it often. Occasionally, i restarted the tomcat server from within eclipse. So i thought that might have overloaded the ide.

I closed eclipse and then started it again. It started up smoothly, but some of the changes i made were not saved. That's ok. But eclipse reported that the tomcat server is "stopped".


Then when i deployed my web app, i got an error which said that
"Several ports (8005, 8080, 8009) required by Tomcat v6.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).
".




I was quickly able to reckon that tomcat might not have been stopped properly because of the ide crash.
So i attempted to start/restart the server from eclipse, but couldn't.
Then i went to the task manager and closed the tomcat process manually.

I didn't expect this though. I expected the IDE to recognize correctly whether tomcat is running or not and should not ask the user to manually close the process.

After closing the tomcat process i was able to deploy my webapp.

But as time went, eclipse threw more and more such errors, which frustrated me, as i have to go through the process of not only restarting eclipse but also stop the tomcat process manually.

May be, i need to increase the maximum heap space allocated. But whatsoever, i don't want my IDE to crash. It should rather advice me to start the application with increased heap space.

To be honest, i haven't reported this as an issue yet to the eclipse team. I'll be doing that shortly.
I'm sure they can fix these issues quickly and give us an update.

Other things i really appreciate is the nice xml editor, which really save a lot of time. I find the eclipse xml editor marginally better than that of netbeans.

More on the complaints, i feel the code completion needs to be improved for jsp-el and jstl.
I found virtually no code completion for jsp-el.
Also, creating a new servlet is not as easy as creating a jsp, atleast in eclipse.
I need to select various nodes to create a servlet. Eclipse needs improvement here.

So by the current standing, eclipse 3.3 provides good if not great support for java web development. I haven't explored the struts/jsf support in eclipse yet.
Eclipse needs to improve in the web development area, if it want to pose a strong fight to other IDEs out there.