Saturday, November 21, 2009

Installing Apache Ant

Introduction
Apache Ant is a software tool for automating software build processes. It is similar to make but is implemented using the java language, requires the Java platform, and is best suited to building Java projects.
The most immediately noticeable difference between Ant and Make is that Ant uses XML to describe the build process and its dependencies, whereas Make has its Makefile format. By default the XML file is named build.xml. For a example if your project consists of many java classes and you want to build them (make .class files) in to seperate destinations you can easily do that by configuring build.xml file.
Ant is an Apache project. It is open source software, and is released under the Apache Software License.

Download


Apache Ant 1.7.1 is now available for download (This is in zip format and the binary distribution).


Installing Ant

  1. Before installing Ant make sure you have JDK1.3 or above installed on your machine and you can call javac or java -version from your command prompt.
  2. Unzip the downloaded Ant to a directory as you want. Though there are several folders in Ant Home you only need the bin and lib directories to run Ant.
  3. Now you have to set your environment variables of your machine. Those who have done this for java knows how to do it.
  • First right click on your mycomputer icon. go to advance system settings and click on the environment variable button in the advance tab of that window. Then Environment variable box will apear and under user variables select path and click edit.

  • If you have already set path for java you should see that path also under the value. Enter Your new path to the corner of your java path as below.
value C:\Program Files\Java\jdk1.6.0_05\bin;C:\apache-ant-1.7.1-bin\apache-ant-1.7.1\bin
~make sure to go deeper in to the bin of ant as in java

  • Then click ok button and you have to set new tow variables in addition to that.
  1. JAVA_HOME - click on the new button of user variables and type JAVA_HOME as variable name. For the value give C:\Program Files\Java\jdk1.6.0_05 (*not bin included) and click ok.
  2. ANT_HOME - click on the new button of user variables and type ANT_HOME as variable name. For the value give C:\apache-ant-1.7.1-bin\apache-ant-1.7.1 (* where you put your ant folder and not up to the bin) and click ok.
Now You have successfully configured settings for Apache Ant. To test it open cmd and type ant.
If you can see a out put
Buildfile: build.xml does not exist!
Build failed

Then it has successfully installed. If you come up with an error like can not find the location of ./././tool.jar, you haven not set your 3 environment variables properly.

If you are interested in building a simple java class and how to compile it using ant's build.xml file use this link.

Good Luck...!!!

Friday, November 20, 2009

Deploying Apache Axis2-1.5.1-war in jboss-5.1.0.GA

1. First Download the required distributions.
2. Extract the jboss-5.1.0.GA.zip to a location on your hard drive. It is better not to put it in Programme Files in C drive.

3. Deploy Axis2 on JBoss.

Extract the axis2.war file in to /server/default/deploy directory in jboss server. By default it will be extracted to a directory named “axis2” and you need to rename it to “axis2.war”. Then delete xml-apis-1.3.04.jar and xercesImpl-2.8.1.jar from Axis2.war folder/WEB-INF/lib.

4. Deploy Rampart (You downloaded it in section 1).

Copy the jar libraries (there were six jars in my case) in lib directory of Rampart binary distribution to WEB-INF/lib directory of axis2.war and copy the bouncycastle library to WEB-INF/lib directory.
Copy the rampart-1.4.mar and rahas-1.4.mar in module directory of Rampart binary distribution to WEB-INF/modules directory of axis2.war.
(All these modifications happen after you deployed your axis.war folder in jboss)

That's all you have to do...

~Now simply stop any other servers if they are running. Run jboss server by clicking the run.bat in bin folder of jboss.
~Type http://localhost:8080/axis on your browser (In this case it is http://localhost:8080/axis2 coz mine i did not change the original name).

~...Boomed...You will be displayed the Axis home page and several links. Get the experience with axis (I my self tried this and it worked fine for me). So why not You.

Good Luck!!!

Saturday, October 31, 2009

Knowledge Management for Today's Business

Knowledge is something every one needs to gain during various ages of their lifes. Manageing this knowledge efficiency is something that bigger companies pay less attention. Suppose you are working in a big softweare company. A new comer or rather a recruit comes and ask from you How to download a suitable plug in for Hibernate. You play a role in management side and you are unable to give a direct answer to that question.

When such a problem occurs, it is better if you can guide him to the relevant place or to the relevant person. To do so, your company should have a good Knowledge Management system which is available for every one to access. Some kind of a on-line repository will lead developing team to share their knowledge with each others and keep in touch with the project constantly.

But this sharing knowledge should be managed properly. To pace with the competitive, fast changing technology, sharing and managing knowledge is one of the core factors that every one should concern.

Sunday, September 6, 2009

Installing a J2ME app you built in your phone...

Hi dudes,

I am really a new comer for this field and when i developed my very first J2ME app in netbeans IDE, I wanted it to install in my phone. So just made a little googling and came up with a general idea.

Before googling when i explored the packages created by netbeans IDE, i found in the 'dist' folder there are jar and jad files. SO i directly send them to my phone and tried to install. But while the process is in the half way installing, it gave the massage 'invalid operation'.

Then I write click on my project, go properties, deploying and set the Deployment Method to "File Copy" and i set a valid folder. I right clickd on my project again and i selected "Deploy" to which it compiles it all as it should and it creates a JAR and a JAD in the specified folder. Now how do i actually go about getting this onto my phone? I have tried sending both the JAR and JAD to my phone (one at a time of course because even selecting both and going send will only send them one at a time) via bluetooth and USB, and the phone recognizes it as a Java program like everything else i have downloaded and recieved, but when it tries to install it (Says "Please Wait" for a few seconds), it says "Operation Failed". Dissapointment again :-(

But after googling i found out that i need to install the relervent SDK of my phone and through it i should make my jar and jad files. The SDK provides a bunch of tools for controlling and manipulating the mobile device. For example, the Sony Ericsson SDK provides a whole set of tools that allow you to access the phone directly such as manipulating memory, debugging on the actual device as well as directly installing software onto it. In this case, it takes a JAD and JAR file, and installs it directly onto the phones memory, basically bypassing the phones functionality. The additional advantage is that unlike the phone, it will provide you with exact reasons why it failed.

So, the steps should be:
1) Install the SDK.
2) If using Netbeans, Right click on your project and Go properties->Platform
3) Make sure that you have set the right Emulator Platform set (in my case, it is "Sony Ericsson SDK 2.5.0 for the Java(TM) ME Platform(Debug On-Device)"). From there, select the correct device type. I chose "SonyEricsson_JP-7". I could have been specific to my phone, however this seems to be a good generic choice, and it workes fine for me (You may need to find the correct compatible one for your phone).
4) Under Deploying, select "File Copy", and then pick a destination.
5) Press OK. Go back and right click on your project but this time, press deploy. You should find it will compile your JAR and JAD. From here, you have 2 installation methods:
a) Using the SDK of your phone, directly install the Midilet to your phone using the JAD and JAR files.
b) Using whatever transfer method you have handy (USB, Bluetooth or Infrared), send the JAR file to your phone. In my case, Right-clicking on the JAR and going "Send to->Bluetooth device" works fine. In some cases, if you have installed the extra software for your phone, you may have a "Send to->Usb Device->My Phone" or something. Alternatively, the PC Suite it comes with may help you here.

I got this information from the oficial sun forum site http://forums.sun.com/

Saturday, September 5, 2009

Certainity of Love :: is a matter of doubt

Even in my dreams..
I never saw the darkness of my life
Before U, i never saw the world...

U gave me ur smile,
U saw me to be releaf,

I could n't see how my life changed being with U...
i didn't want to hide it
i kissed u,
i kissed u again and ....again

U gave me feelings for u
i coud n't get out of it

we didn't want to talk,
u read my eyes and i read urs,
i nerver wanted to tell
I Love U beacause we Loved US,
Once i touched ur heart and u touched mine...

BUT..
every thing ended without sayin good BYE!!!
I'm sorry...
I still live in the world u saw me!!!

Friday, August 21, 2009

Casting of Computers

if you are a IT related person or interested to know how the machine you are currently working was developed...read this post. It is about how the cast of a computer occured during the past decades within various obstacles and goals.

First Generation - 1940-1956: Vacuum Tubes

First generation computers relied on machine language, the lowest-level programming language understood by computers, to perform operations, and they could only solve one problem at a time. Input was based on punched cards and paper tape, and output was displayed on printouts.


Second Generation - 1956-1963: Transistors

Second-generation computers moved from cryptic binary machine language to symbolic, or assembly, languages, which allowed programmers to specify instructions in words. High-level programming languages were also being developed at this time, such as early versions of COBOL and FORTRAN. These were also the first computers that stored their instructions in their memory, which moved from a magnetic drum to magnetic core technology.


Third Generation - 1964-1971: Integrated Circuits

Transistors were miniaturized and placed on silicon chips, called semiconductors, which drastically increased the speed and efficiency of computers. Computers for the first time became accessible to a mass audience because they were smaller and cheaper than their predecessors.


Fourth Generation - 1971-Present: Microprocessors

The microprocessor brought the fourth generation of computers, as thousands of integrated circuits were built onto a single silicon chip. What in the first generation filled an entire room could now fit in the palm of the hand. The Intel 4004 chip, developed in 1971, located all the components of the computer - from the central processing unit and memory to input/output controls - on a single chip.

As these small computers became more powerful, they could be linked together to form networks, which eventually led to the development of the Internet. Fourth generation computers also saw the development of GUIs, the mouse and handheld devices.

Fifth Generation - Present and Beyond: Artificial Intelligence

Fifth generation computing devices, based on artificial intelligence, are still in development, though there are some applications, such as voice recognition, that are being used today. The use of parallel processing and superconductors is helping to make artificial intelligence a reality. Quantum computation and molecular and nanotechnology will radically change the face of computers in years to come. The goal of fifth-generation computing is to develop devices that respond to natural language input and are capable of learning and self-organization.


Human cast

Human means an animal. But a kind of special animal among other animals. How this Human has become so special among others. This is a matter to be discussed deeply. If you are a human, you might think why you are reading this or rather standing in front of your computer like this without fighting with other animals to survive. You also might be between the animals if your early man kind did not have any feelings for new inventions or rather a compassion for standing upon with each other. Some how They have achieved their goals and so you have been able to spend a much more comfortable life in comparison with your own neighbours(animals) in early ages.

Some says that inventing of the tyre is the key point. But some says inventing the flame made human to cast so rapidly among the other kind of species. Capability of grabing a thing from fingers made human casting so fast is some one else's idea.
Human can use their brain up to twenty present is another concept. Feeling things like love, compassion, anger more sensitively than the other species is another intention. One can argue on these for days. But no one can tell exactly which is the most closer reason to be like this.

What ever the reason may be, one thing can be expressed for sure that this rapid development of humans has become the greatest destruction of not only the human kind but hole earth also. So This human should be responsible for the lost of every animals of this planet day by day.

We have developed. But we are not civilised.

Thursday, August 20, 2009

Introduction to J2ME

Hi everyone,

Today Everybody in Information Technology Industry, use to follow java as a programming language. But the problem is among majority of them stop learning further more after completing J2SE or j2EE. But today in most IT companies expect wireless technology from developers as now the technology has gone beyond the Global village concept and wireless mobility has become a one of the key factor to that.
When talking about wireless mobility, learning java micro edition can not be neglected. So this post will give you a little introduction on J2ME and its basic features.

Introduction

This tutorial assumes that you have some familiarity with general programming concepts and the Java language.

What is J2ME?

J2ME stands for Java 2, Micro Edition. It is a stripped-down version of Java targeted at devices which have limited processing power and storage capabilities and intermittent or fairly low-bandwidth network connections. These include mobile phones, pagers,wireless devices and set-top boxes among others.

A Sample Wireless Stack would consist of:

  • Profiles
  • Configurations
  • Java Virtual Machines
  • Host Operating System

What is a J2ME Configuration?

A configuration defines the minimum Java technology that an application developer can expect on a broad range of implementing devices.

J2ME Connected, Limited Device Configuration (CLDC)

  • specifies the Java environment for mobile phone, pager and wireless devices
  • CLDC devices are usually wireless
  • 160 - 512k of memory available for Java
  • typically has limited power or battery operated
  • network connectivity, often wireless, intermittent, low-bandwidth (9600bps or less)

J2ME Connected Device Configuration (CDC)

  • describes the Java environment for digital television set-top boxes, high end wireless devices and automotive telematics systems.
  • device is powered by a 32-bit processor
  • 2MB or more of total memory available for Java
  • network connectivity, often wireless, intermittent, low-bandwidth (9600bps or less)

These two configurations differ only in their respective memory and display capabilities.

What is a J2ME Profile?

A specification layer above the configuration which describes the Java configuration for a specific vertical market or device type.

J2ME Profiles

J2ME Mobile Information Device Profile (MIDP)

  • this is the application environment for wireless devices based on the CLDC
  • contains classes for user interface, storage and networking

J2ME Foundation Profile, Personal Basis, Personal and RMI profiles

  • these are profiles for devices based on the CDC, which are not addressed in this tutorial

Virtual Machines

The CLDC and the CDC each require their own virtual machine because of their different memory and display capabilities. The CLDC virtual machine is far smaller than that required by the CDC and supports less features. The virtual machine for the CLDC is called the Kilo Virtual Machine (KVM) and the virtual machine for the CDC is called the CVM.

In my next post I will show how to create a simple J2ME application using netbeans IDE.

Thank you.