summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-03-13 14:47:09 +0000
committerPaul Phillips <paulp@improving.org>2009-03-13 14:47:09 +0000
commitcd105bb1f485acec9a5f4e57b859112f30bd43f5 (patch)
tree60a9ab61bc1a7e1c7b76ed21946a905216b2bbe8 /src/library
parentca9431e11c1d72de95ef76cc04474725eae34b0e (diff)
downloadscala-cd105bb1f485acec9a5f4e57b859112f30bd43f5.tar.gz
scala-cd105bb1f485acec9a5f4e57b859112f30bd43f5.tar.bz2
scala-cd105bb1f485acec9a5f4e57b859112f30bd43f5.zip
More consolidation and duplication elimination ...
More consolidation and duplication elimination in Properties.
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/util/Properties.scala9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/library/scala/util/Properties.scala b/src/library/scala/util/Properties.scala
index 77a2a10c4c..45ccb15985 100644
--- a/src/library/scala/util/Properties.scala
+++ b/src/library/scala/util/Properties.scala
@@ -54,6 +54,9 @@ private[scala] trait PropertiesTrait
val versionString = "version " + prop("version.number", "(unknown)")
val copyrightString = prop("copyright.string", "(c) 2002-2009 LAMP/EPFL")
val encodingString = prop("file.encoding", "UTF8")
+ val isWin = sysprop("os.name", "") startsWith "Windows"
+ val isMac = sysprop("java.vendor", "") startsWith "Apple"
+ val scalaHome = sysprop("scala.home", null)
// provide a main method so version info can be obtained by running this
private val writer = new java.io.PrintWriter(Console.err, true)
@@ -61,11 +64,7 @@ private[scala] trait PropertiesTrait
def main(args: Array[String]) { writer println versionMsg }
}
-/** A utility to load the library properties from a Java properties file
- * included in the jar.
- *
- * @author Stephane Micheloud
- */
+/** Loads library.properties from the jar. */
object Properties extends PropertiesTrait {
protected def propCategory = "library"
protected def pickJarBasedOn = classOf[Application]