Go to Run menu, select External Tools click and select External Tools configuration like below
After that click on Program and add new program and select the location of apache server
Go to Run menu, select External Tools click and select External Tools configuration like below
After creating a custom code formatter in Eclipse, as discussed in my previous post How to create and share Eclipse code style formatter, it is now time to put that code formatter in action. Code formatting should be an automatic process. Following are the steps which describe how to enable auto formatting in Eclipse.
Step 1
Open Eclipse and go to Window -> Preferences

Step 2
In Preferences window, go to Java -> Editor -> Save Actions

Step 3
In the right pane of Save Actions, check the following options:

Click on Apply and then OK to save the changes. Now the next time you hit save in Eclipse, your code will be automatically formatted. Pretty cool, eh?
Often while debugging Java applications, it is required to view the source code of standard Java classes. This post describes how to attach JDK source code in Eclipse IDE.
Step 1
Open Eclipse and go to Window -> Preferences

Step 2
In Preferences window, go to Java -> Installed JREs. Select the JRE and click on the Edit button.

In the Edit JRE window, select the file rt.jar in the section named JRE system libraries and click on Source Attachment button.

In the Source Attachment Configuration window, provide the location of the src.zip which is usually found in the JDK root folder. For example, C:/Program Files/Java/jdk1.7.0_13/src.zip

Click OK -> Finish -> OK to save and apply the changes. Now in your Java program if you press CTRL + left-mouse-click on any standard Java class, for example java.lang.System, it will open up the source code for that class.
When a new code file is created, the author name in the @author is set to the value which is taken from the user.name environment variable. One way to override this value is to modify the eclipse.ini file. Following are the steps which will show you how to change user name in Eclipse code templates.
Navigate to the location of eclipse.ini file on your system (a file search will reveal its location). Add the following parameter to the list of the Virtual Machine arguments in the eclipse.ini file.

-vmargs
...
...
...
-Duser.name=Your name
Make sure to add this user name argument after the -vmargs command and also don't forget to restart Eclipse after making this change. After this change, wherever the ${user} variable is used, it will be replaced with the user name entered in the eclipse.ini file.

Often there is a need to decompile third party or standard Java classes to understand their code. But there is no built-in Java decompiler for Eclipse. However there are freely available external plugins which can be installed in Eclipse to create a built-in decompilation option. Java Decompiler project is one such plugin. In this blog, I’ll list down the steps required to install the JD-Eclipse plugin.
Open Eclipse and go to the menu option Help -> Install New Software… In the Available Software window, click on the link, Available Software Sites. In the window, click on Add button. In the pop-up window, provide any name to the site and paste the update site URL as http://jd.benow.ca/jd-eclipse/update and click on OK.



In the Available Software window, select the newly created site from the drop down and wait. Eclipse will fetch the list of plugins available for installation.
Select all the packages and click Next. Accept the license agreement and click Finish to begin the installation of plugin.


Restart Eclipse after the installation is finished.

In the Eclipse menu and go to Window -> Preferences

In the Preferences windows, go to General -> Editors -> File Associations. In the right-pane, select .class without source as the file type. In the Associated editors: section below, click on the Add button. In the pop-up window which opens up, select Internal editors and in the list below it, select the Class File Editor and click on the OK button


Select the Class File Editor (identified by the coffee-cup icon) and click on the Default button. This makes JD-Eclipse as the default decompiler for class files without source.


Now, simply double-click on any .class file and JD-Eclipse will decompile it for you. You can also place debug points in the decompiled classes while debugging your applications.
Eclipse is a favourite tool for Java/JEE developers (including me ). When I started learning Python, I wanted to use Eclipse as my preferred IDE for Python development. I found out that PyDev is one good open source plugin which can very well integrate with Eclipse.
Although PyDev is available through Eclipse Marketplace, I had some problems making it work from there. After a few hit and trials, I found a way to integrate the plugin in Eclipse without going through the marketplace. With this blog, I would like to share the steps for how to install Python PyDev plugin in Eclipse.
1. Make sure that the latest version of the Java Development Kit is installed on your computer.
2. Download and install the Eclipse IDE for Java EE Developers for your operating system.
Download the zip release of PyDev plugin.



Unzip the downloaded PyDev plugin. It will contain two folders; features and plugins

Browse to your Eclipse installation folder and locate the dropins folder

Copy the features and plugins from the unzipped PyDev plugin to the dropins folder

Restart Eclipse and open the PyDev perspective to verify that Pydev plugin has successfully installed



Now that the PyDev plugin is installed, let’s create a Python Hello World project to validate that our IDE is ready to crunch Python code. Open the project wizard and create a new Python project.

If Python is not installed on the system or Python interpreter is not configured, the project creation wizard will show an error “Project interpreter not specified”

If Python is not installed, this is just the right time to do so. Go to the Python website and download the appropriate installer.

After installing Python, go back to the project creation wizard and click on the link text “Please configure an interpreter before proceeding” and in the pop-up window, click on the button, Quick Auto-Config. This will automatically find the installation path of Python and configure Python interpreter in Eclipse.
While you are there, also click on the option, “Create ‘src’ folder and add it to the PYTHONPATH”

Create a package within the HelloWorld src folder and create a module which prints Hello PyDev! text.

Run the program and it should display Hello PyDev! on the console output


Hope that helps. In the next blog, I’ll show you how to install Python packages in Eclipse. See you in the next blog!