August 2009 - Posts

I was trying out HSQLDB to run SQL scripts with ANT last night when I encountered java.lang.UnsupportedClassVersionError. Never encountered this in 3 years of coding. Recently, I tried to play safe and installed several JDK (and JRE) versions, and so it happened.

Quick diagnostics:

  1. Run java -version from commandline, you should be able to see the JRE that is in your %PATH% environment variable
  2. Run echo %JAVA_HOME%, this is what ANT would use if you try to run ant -diagnostics from the commandline, an entry like java.home : C:\Program Files\Java\jdk1.5.0_18\jre should be there so make sure JAVA_HOME also points to an updated JRE
Posted by lamia | with no comments
Filed under: , ,

Just wanted to share one of things I get busy with during my free time. This is like an array or Hashtable if you prefer. Whatever. Just copy and save this a batch file (.bat) and run from CLI

@ECHO OFF

SET __TEST.FNAME=Ray
SET __TEST.MNAME=Allen
SET __TEST.LNAME=Pierce

FOR /F "tokens=2* delims=.=" %%A IN ('SET __TEST.') DO ECHO %%A = %%B


Posted by lamia | with no comments
Filed under: