java - Why does System.getProperty("line.seperator") return null? -
exactly title asks, why system.getproperty("line.seperator") returning null.
from looking around gather shouldn't.
running code shows seems set line separator broken:
class test { public static void main( string[] args ) { system.out.println(system.getproperties()); } } $ java test {java.runtime.name=java(tm) se runtime environment, sun.boot.library.path=/usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/i386, java.vm.version=19.1-b02, java.vm.vendor=sun microsystems inc., java.vendor.url=http://java.sun.com/, path.separator=:, java.vm.name=java hotspot(tm) server vm, file.encoding.pkg=sun.io, sun.java.launcher=sun_standard, user.country=gb, sun.os.patch.level=unknown, java.vm.specification.name=java virtual machine specification, user.dir=/home/niko, java.runtime.version=1.6.0_24-b07, java.awt.graphicsenv=sun.awt.x11graphicsenvironment, java.endorsed.dirs=/usr/lib/jvm/java-6-sun-1.6.0.24/jre/lib/endorsed, os.arch=i386, java.io.tmpdir=/tmp, line.separator= , java.vm.specification.vendor=sun microsystems inc., os.name=linux, (and on...) however when trying in code null:
class test{ public static void main( string[] args ) { system.out.println("this not " + system.getproperty("line.seperator") + "broken"); } } $ java test not nullbroken i using ubuntu 10.10 , java (build 1.6.0_24-b07).
thanks
you've misspelt line.separator.
Comments
Post a Comment