Last active
August 29, 2015 14:04
-
-
Save alcidesfp/6b65a54e459a3cd16d75 to your computer and use it in GitHub Desktop.
Kawa: Load a properties file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
":"; 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