Wednesday, July 3, 2013

Dynamically Build and Deploy Java code without server start up - Hotswap

Hotswap enables developer to build and deploy the changes dynamically without server restart. It reduces development time and maximizes productiveness.

The server can be any (Jboss,Weblogic etc). It works very well for ATG and even to java application.

Configure Hotswap to build.xml


Step 1 

Download Hotswap.jar from google.


Step2

Copy the Hotswap to project lib folder.


Step 3 

Add the following target to build.xml


<taskdef name="hotswap" classname="dak.ant.taskdefs.Hotswap">
         <classpath path="C:\Project\lib\hotswap.jar" />
         </taskdef>



<target name="hotswap" depends="init">
            <tstamp>
                    <format property="class.tstamp" pattern="MM/dd/yyyy kk:mm:ss" />
            </tstamp>
   
            <property name="buildclasspath" refid="build.classpath" />
            <echo message="Compiling classes using classpath ${buildclasspath}" />
            <javac  srcdir="
C:\Project\src\main\java"
                    destdir="
C:\Project\gen\main\classes"
                    includes="**/*.java"
                    debug="on"
                    optimize="off"
                    source="${java.source.version}">
                    <classpath refid="build.classpath" />
            </javac>
            <hotswap verbose="true" port="8453">
                    <fileset dir="
C:\Project\gen\main\classes\" includes="**/*.class">
                            <date datetime="${class.tstamp}" pattern="MM/dd/yyyy kk:mm:ss"              when="after" granularity="0"/>
                    </fileset>
            </hotswap>
      </target>


 Done

 Make any changes to java file and build the project . the changes will be automatically deployed to server.





Configure Code Collaborator In Eclipse


Code Collaborator is code review toll configured with eclipse and can work independently


Configure Code Collaborator In Eclipse

Steps 1
 Download jadnt158 and extract to any driver for eg: D:\Projects\Software\jadnt158

 

 




Tuesday, June 25, 2013

Configure Code Coverage Tool In Eclipse

Configure Java Decompiler jad plugin in eclipse



De-compiler  is very essential in day to day life of a developer.

Once the plugin is configured  in eclipse, pressing F3 on the class will automatically decompile the class

Configure JAD Plugin to eclipse


Steps 1

 Download jadnt158 and extract to any driver for eg: D:\Projects\Software\jadnt158

Steps 2:

Download net.sf.jadclipse_3.3.0.jar and copy to eclipse\plugins

Step 3:

Configure Jadclipse path as D:\Projects\Software\jadnt158\jad.exe configuration Jad under in Windows - Preferences - Java - JadClipse if avaiable or look for path Windows - Preferences - Java - Decompilers-Jad-Path to decompiler as show below.



Dont change anything for Directory for temporary files

 Step 4:
 

Simply select Apply and Click Ok 

Step 5:
 Restart eclipse.
   
Step 6 
In Eclipse, try F3 into any class which does not has the source, Jad will decompile it automatically.