Wednesday, January 04, 2012

foobar2000 - A pretty nice music player for windows

foobar2000: I discovered today foobar2000 and have used it for almost the whole day today and i must say that its very light and fast (you really can feel it is so). Highly recommended - go check it out.


Tuesday, January 03, 2012

Batch script to change Java Home between different JDKs

I recently happened to be working on multiple releases with some of them requiring the code to be compiled with JDK 6 whereas the more recent releases requiring code to compile with JDK 7. So i wrote up the following batch script to make the job of switching between the 2 JDKs easier. Before i run my ant build script i run the below script to set to ‘7’ for JDK 7 or ‘6’ for JDK 6.

@ECHO OFF
echo %1%
 
if "%1"== "" ( 
    echo "Syntax: javahome 7 or 6" 
    Goto :end
) 
if "%1" == "7" (
    echo "Setting JDK 7"
    
    set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_01
    GOTO :printver
) 
 
if "%1" == "6" (
    echo "Setting JDK 6"
    
    set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_23
    GOTO :printver
)
 
:printver
echo %JAVA_HOME%
 
set NEW_PATH=%PATH%
FOR /F "delims=;" %%P IN ("%PATH%") DO (
    @ECHO path = %%~P
 
)
 
 
set PATH=%JAVA_HOME%\bin;%NEW_PATH%
echo %PATH%
 
java -version
:end

Book Review: Spring Start Here: Learn what you need and learn it well

  Spring Start Here: Learn what you need and learn it well by Laurentiu Spilca My rating: 5 of 5 stars This is an excellent book on gett...