Posts

Showing posts from September, 2012

Firefox search bar plugin

Image
Hi Guys, We can do a little fun with Firefox search bar .We can create our own search engine there. Here i am creating a simple example of how you can create your own plugin. Go to the installed directory of Firefox and locate the folder "searchplugins" .Open this folder ,here you will see all the search engines xml listed there. You can copy paste the below code and restart Firefox to see your search engine in the drop down of search bar list. <SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> <ShortName>MySearch</ShortName> <Description>Demo search by google.. < /Description> <InputEncoding>UTF-8 < /InputEncoding> <Url type="text/html" method="GET" template="https://www.google.com/search"> <Param name="q" value="{searchTerms}"/> </Url> <SearchForm > https://www.google.com/ < /SearchForm> </SearchPlugin> an

Ant build file to compile and clean resources

Hi, Below is a example for showing how to compile ,clean and make jar file of a project. Here i have given just a brief introduction of the tags how to use them. Advance build file structure i will include in coming post. Example: <?xml version="1.0"?> <project name="classroom" basedir="."> <property name="projectname" value="classroom" /> <property name="srcprop.dir" value="conf" /> <property name="build.dir" value="./compiled" /> <property name="src.dir" value="src"> </property> <target name="usage"> <echo message="------------" /> <echo message="Building ${projectname} project..." /> </target> <!--Create  directory --> <target name="init"> <mkdir dir="${build.dir}" /> <echo message="Compiled Dir

Running all targets in ant through command prompt

Suppose you have an ant script build.xml to build the project which contains multiple targets inside it.If you are running the script through eclipse then you can enable or disable the targets by right clicking on build.xml and click on  " Run As " and in the popup window opened check or uncheck the targets. But how to do the same thing in command prompt. I have one little solution that worked for me. Suppose your build.xml contains some target like this :    <target name="init">   <tstamp>   <mkdir dir="${build}">   </mkdir></tstamp></target>   <target depends="init" description="compile the source " name="compile">   <javac destdir="${build}" srcdir="${src}">   </javac></target>   <target depends="compile" description="generate the distribution" name="dist"  >   <mkdir dir="${dist}/lib"  &g