Saturday, August 21, 2010

Eclipse & Tomcat

Eclipse- It's one of my favorite IDE to work in Java. It not only has support to Java/J2EE but also to SOA which is a technology on demand. So start using eclipse to make your java/j2ee coding easier as it displays code snippets along with your favorite webserver-TOMCAT.
Installation of Eclipse with Tomcat Plugin made Easier





  • Download Eclipse Ganymede from the below site
  • http://www.eclipse.org/ganymede/
  • Extract the zip file,that's it eclipse is ready to use.
  • Double click on the "Eclipse" icon (Eclipse.exe) to open Eclipse  
  • Now to install the webserver tomcat
  • Follow the link :www.eclipsetotale.com/tomcatPlugin.html
  • Extract the sysdeo tomcat plugin to your eclipse plugin folder (for eg. C:/Program Files/eclipse/plugins)
  • Now, quit your eclipse incase if it's running and restart by typing the folowing in cmd prompt
  • Move to the folder where eclipse in installed C:/Program files/Eclipse > Eclipse.exe -clean
  • This will restart eclipse and now you can see your tomcat plugin installed by traversing through
  • Windows >Preference >Tomcat
  • Now, select the version of tomcat 5.x
  • Set the context declaration mode as :Context Files
  • and context directory as C:\Program Files\tomcat\apache-tomcat-5.5.29\conf\Catalina\localhost
  • Now, You can see 3 icons appearing in the tools bar of eclipse(start,stop and restart tomcat)
  • you can start the tomcat by clicking on start tomcat button
  • Open a browser and type http://localhost:8080/, if you see the tomcat startup page then that's it VOILA!!!!!! 
  • Your tomcat is set with eclipse.


End the lousy application

If the application that you are working on troubles you and doesn't quit even after injecting it with "CRTL+ALT+DEL" keys then you may likely end up with a big task of restarting your system to kill the running process. Instead you could follow these simple steps to put an end to the lousy process.




Open cmd prompt-via run and type cmd
Then type the command "TASKLIST" -this will list all the currently running processes in the system
Now, note down the process ID next to the process which you want to kill.
Then type, TASKKILL /PID (the process id).
If the process id is 2655 then type
taskkill /PID 2655
Sometimes you may have to force kill your application to end it so type the following
taskkill /F /PID 2655



That's it now it will solve your problems.

Saturday, July 31, 2010

My Favorite Technology!!

So here we go... ummm yeah, I was just thinking which technology to write as my first post. After some brain crushing minutes I ended up with the technology I know pretty well and that is JAVA.
Why JAVA??
JAVA as you all know is famous for its Portability that is as per the famous quote
"Write Once Run Anywhere". So once you finish writing a java program,you can compile it using your java compiler so that it is turned to bytecode. The Bytecode is a platform-independent code which can be used to run the written java program on any machine which has a JVM-java virtual machine installed in the system. The JVM interpretes the bytecode to run your java program.
              The next question that arises is how to compile and run a java program?A software called JDK that was developed by Sun Microsystems makes our job simpler.A compiler called 'javac' that comes with JDK helps to compile the java program. Follow the below steps to successfully create your first java program.

Step1:
Create a java program HelloWorld.java

package firstPackage;
public class FirstProgram {
public static void main(String args[]){
 System.out.println("My first java program");
     }
  }

}
Step:2
Compile the java program
now open the command prompt and go to the place where you had created your java program and type the below command

G:\workspace\firstjava\src\firstPackage>javac -d c:\users\me FirstProgram.java
-This will create FirstProgram.class inside a folder named 'firstPackage' which is the package name which you had given in the java program.
you can find this here.....C:\users\me\firstPackage
Step:3
Now type the following in the command prompt after traversing to the required path

C:\Users\Me>java firstPackage/FirstProgram
My first java program

That's it! Your first java program is created.

HERE'S ME

Hey All!
Just taking my baby steps to write my own blog ,wish me all luck to be successful. Hope i'll enrich you with the best of knowledge I have.