jeudi, mars 08, 2007

Créer un classpath automatiquement

# generate env.bat with all lib/*.jar

classpath=""
Dir["lib/*.jar"].each do |filename|
  classpath << filename + ';'
end
classpath << "bin"

File.open("env.bat", File::CREAT|File::RDWR) do |aFile|
  aFile << "SET CLASSPATH=" + classpath
end
Technorati tags: