Skip to content

Instantly share code, notes, and snippets.

@alcidesfp
Last active August 29, 2015 14:04
Show Gist options
  • Save alcidesfp/6b65a54e459a3cd16d75 to your computer and use it in GitHub Desktop.
Save alcidesfp/6b65a54e459a3cd16d75 to your computer and use it in GitHub Desktop.
Kawa: Load a properties file
":"; exec kawa -f $0 "$@" #-*- coding:utf-8 -*-
(define-alias Properties java.util.Properties)
(define-alias FileInputStream java.io.FileInputStream)
(let ((props (Properties)))
(props:load (FileInputStream "application.properties"))
(format #t "Nombre: ~A~%" (props:getProperty "app.name"))
(format #t "Version: ~A~%" (props:getProperty "app.version")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment