Saturday, September 30, 2006

நிம்மதி சுழ்க!

This poem was written & read out by Vairamuthu, in front of public of Tiruppur (Tamil Nadu) at a opening ceremony of a cemetery! This poem was very much appreciated and consoled many hearts over the audience.

(Ananda Vigatan published the poem in last week issue).

நிம்மதி சுழ்க!

ஜென்மம் நிறைந்தது
சென்றவர் வாழ்க
சிந்தை கலங்கிட
வந்தவர் வாழ்க
நீரில் மிதந்திடும்
கண்களும் காய்க
நிம்மதி நிம்மதி
இவ்விடம் சூழ்க!
....

ஜனனமும் பூமியில்
புதியது இல்லை
மரணத்தைப் போல் ஒரு
பழையதும் இல்லை
இரண்டுமில்லாவிடில்
இயற்கையும் இல்லை
இயற்கையின் ஆணைதான்
ஞானத்தின் எல்லை
...

பாசம் உலாவிய
கண்களும் எங்கே?
பாய்ந்து துழாவிய
கைகளும் எங்கே?
தேசம் அளாவிய
கால்களும் எங்கே?
தீ உண்டதென்றது
சாம்பலும் இங்கே
கண்ணில் தெரிந்தது
காற்றுடன் போக
மண்ணில் பிறந்தது
மண்ணுடல் சேர்க
எலும்பு சதை
கொண்டஉருவங்கள் போக
எச்ச்ங்களால் அந்த
இன்னுயிர் வாழ்க
...

பிறப்பு இல்லாமலே
நாளொன்று இல்லை
இறப்பு இல்லாமலும்
நாளொன்று இல்லை
நேசத்தினால் வரும்
நினைவுகள் தொல்லை
மறதியையப்போல் ஒரு
மாமருந்தில்லை
...

கடல் தொடும் ஆறுகள்
கலங்குவதில்லை
தரைதொடும் தாரைகள்
அழுவதுமில்லை
நதி மழை போன்றதே
விதியென்று கண்டும்
மதிகொண்ட மானுடர்
மயங்குவதென்ன?

- வைரமுத்து.

Thursday, September 28, 2006

Lyrics.

The lyrics which I read recently. I wish to blog them, before they leave my memory. Cool lines!


1. இந்தியாவைச் சுற்றி மூன்று பக்கம் கடல்கள்,
நான்கு பக்கம் கடன்கள்.
- யாரோ.

2. கலீலியோவின் உலகை சதுரமாக்கியது
என் ஜன்னல் வழிப் பார்வை.
- கமல் ஹாசன்.

3. நெஞ்சு பொறுக்கு திலையே! - இந்த
நிலைகெட்ட மனிதரை நினைந்துவிட்டால்,
அஞ்சி யஞ்சிச் சாவார் - இவர்
அஞ்சாத பொருளில்லை அவனியிலே
வஞ்சனைப் பேய்கள் என்பார் - இந்த
மரத்தில் என்பார்; அந்தக் குளத்தில் என்பார்
துஞ்சுது முகட்டில் என்பார் - மிகத்
துயர்ப்படுவார் எண்ணிப் பயப்படுவார்.

- பாரதியார்

Tip #3: Difference: Jvm, JRE, JDK, J2SDK, HotSpot...

JVM, JRE, JDK, J2SDK, HotSpot... : These terms are often parts of Java programmers communication. But, it seems.. all such terms sound to mean a same thing – no, they just seem, not really. Let’s discuss and distinguish the terms in detail.

JVM- Otherwise called as 'Java virtual machine' that actually takes the .class file as input, interprets it and executes it. JVM is platform dependent. The java.exe, found in your J2SDK/bin folder is called as JVM!

JRE - JRE includes a JVM and standard libraries (which are imported by default during execution). Note, JRE doesn't include other tools like jdb, javac, javap and etc. It includes only the jvm (java.exe) and default packages. JVM can be thought as a proper subset of JRE.

JDK - JDK is a box in which everything is put together. JDK includes JRE as well as other necessary tools and libraries. You have JRE, JVM and all the standard & extended libraries.

Important differences:

1. The important difference between JRE and JDK is that, Java License allows any one to re-distribute the JRE along with his product. But, it is illegal to re-distribute the JDK with your product!

2. JDK and J2SDK exactly refer to a same thing. But, what is difference? The term ‘JDK’ is just re-branded (re-named) to ‘J2SDK’ to bring a Standard (guts?) to Java. Seriously! :-)

The following simple formulas can help you to understand easily what were said above:

JVM = java.exe
JRE = JVM + Standard Libraries – Other java tools like jdb, javac.
JDK = JRE + Other java tools + all core libraries and packages.
J2SDK = rename (JDK)

Exercise:

The term ‘HotSpot’ is left unexplained. If you are curious to know, Pl, spare some minutes to find out yourself and post the answer as comment.
Or, let me post the answer in next tip.

Wednesday, September 27, 2006

Mr. Smart: Jackie Chan



I haven’t ever seen any one being this much smart in his old age! Jackie Chan is an exception. He is a most famous martial artist, asia’s most paid, and the most brisk, never seen ever.

If you pay keen attention to his kicking and jumping, first time you would wonder how these things are possible to him. But, the risk and pain he takes behind the screen is horrible. The News is true that no one insurance company is ready to give Jackie, a insurance policy. They are afraid of his risk stunts.

I guess the first Jackie’s film I saw is ‘Police Story II ‘. He acted as a cop. He usually take the roll of a cop and chases smugglers. He never assists dupes. He himself acts in any challenging fight & chase scenes. He would have become world’s hero if he had been into Holly Wood. But, time didn’t make it happen. All his famous adventures are limited only within Asian countries. Only, very few of his films went to Holly Wood and they are block busters, of course. Rush Hour, Shangai Noon are some few to name.
I am, sort of his fan, and don’t miss his films!

And, yes, he has rewarded with numerous awards. He’s been the best actor in Hong kong over many years. His films were also big Box Office drawers in many Asian countries and American cities.




The wonder full films by Jackie, I have seen are: The Myth, New Police Story ,Around the World in 80 Days, The Medallion, Rush Hour I & II , Shanghai Noon , Who Am I?, Mr. Nice Guy , Miracles , Super cop , Project A II, Police Story, Drunken Master, The Young Master, Armour of God, Thunderbolt.



He is the Mr. Smart!

Sunday, September 24, 2006

Tip #2: How to access the private variables outside the class in java?

Is that possible?

Yes, it is. Have you ever heard of ‘Java Reflection API’?. If no, then this brief intro can help. Java Reflection API: has set of classes and methods to access the runtime behavior and memory foot print of classes and objects”

Using the reflection API, you can access (any) instance member variable of an object. Yet, you can do a lot more with that.

Don't you thing this is a loop hole in Java? Breaking the integrity of Oops?

Not in that way. This API actually meant for helping people tracing the memory foot print and for developing applications like ‘Java Debugger’, ‘Java Profiler’, ‘Java Application Monitor’ and the likes. Usually, other applications programmers are advised not to use this API unnecessarily.

The following simple example demonstrates how to access the private variable of an object outside the class (using Reflection API):

(This example is referred from javareference.com)

java.lang.reflect.*;

class Example {

private int x = 10; // means not available to outside the class
public int y = 10; // accessible from anywhere.

}

public class ReflectionDemo

{
public static void main(String[] args) throws Exception {

Example e = new Example();
Class ref = e.getClass(); //will return ‘Example’ – right?
Field f = ref.getDeclaredField("x"); // watch here! :)
f.setAccessible(true); // Now the ‘x’ is accessible!
Object obj = f.get(e);
int val=((Integer) obj).intValue();
System.out.println("Private var X is = " + val);

}
}


That’s it!

If you want to know more about Reflection API, spend some minutes at Sun sites/ Tutorial.

Answer for Tip #1

Here comes the answer for the question asked in last tip (Tip #1 Java Memory Issues) : To run the program successfully, you have to increase the memory by using JVM command line options –Xmx and –Xms, like

$java –Xms20m –Xmx120m Memory

The -Xms20m options instructs the JVM to set the initial heap size to be 20 MB and the –Xmx120m options instructs the JVM to set the Maximum heap size to be 120 MB. (If this doesn’t work for your machine, you can try changing the numbers).