Thursday, August 20, 2009

A handy batch script to compile Java programs

[Updated: Dec 22, 2010]
I've always had some trouble remembering the right commands to compile a large-ish Java project from the command line when you don't have Ant at your disposal.
So I thought I should write about it so others (including myself) might find it handy for future reference.
The general idea is to have this kind of directory structure (duh!):


The batch file. Make changes to match your directories.
The last 2 lines create a simple txt file of all your .java file names in the src folder. It then uses the javac command to compile them into the classes folder.
set basedir=c:\projects\myproject
del /Q %basedir%\classes

mkdir %basedir%\classes

set cp=%basedir%\lib\XXX.jar;%basedir%\lib\YYY.jar;%CLASSPATH%

set JAVA_HOME=C:\Programs1\jdk1.6.0


dir /b /s %basedir%\src\*.java > %basedir%\java_files_to_compile.txt

%JAVA_HOME%\bin\javac -classpath %cp% -d %basedir%\classes @%basedir%\java_files_to_compile.txt

xcopy /S %basedir%\src\*.properties %basedir%\classes

jar -cvfm %basedir%\myproject-lib.jar %basedir%\ -C %basedir%\classes/ .

Monday, August 17, 2009

Fork-Join paper and the ReLooper tool

Informative paper on the Fork-Join feature in JDK7 by Doug Lea, of course - Supporting Fine-Grained Parallelism in Java 7.

An Eclipse plugin that automatically refactors loops into the ParallelArray construct in JDK 7 - ReLooper.

Wednesday, August 05, 2009

Forrester report on Complex Event Processing Platforms

I guess CEP is now a mainstream technology according to Forrester. What took them so long, huh?

According to the report (of which you can only find excerpts of unless you buy it), TIBCO BusinessEvents is in the forefront along with a few others. IBM and Oracle seem to be moving closer. Nice to see Esper also in the list. I wonder why JBoss Drools is not there.