Why does System.getProperty("line.seperator") return null?

Exactly as the title asks, why is System.getProperty("line.seperator") returning null.

From looking around I gather that it shouldn't.

Running this code shows that it seems to be set as the line with the separator is broken:

class Test { 
    public static void main( String[] args ) { 

$ java Test 
{java.runtime.name=Java(TM) SE Runtime Environment, sun.boot.library.path=/usr/lib/jvm/java-6-sun-, 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-, os.arch=i386, java.io.tmpdir=/tmp, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., os.name=Linux, (And so on...)

However when trying to get this in code I get null:

class Test{ 
    public static void main( String[] args ) { 
        System.out.println("This is not " + System.getProperty("line.seperator") + "Broken");

$ java Test
This is not nullBroken

I am using Ubuntu 10.10 and Java (build 1.6.0_24-b07).



You've misspelt line.separator.

Need Your Help

SQLBulkCopy Row Count When Complete

sql-server sqlbulkcopy

I am using SQLBulkCopy to move large amounts of data. I implemented the notification event to notify me every time a certain number of rows have been processed, but the OnSqlRowsCopied event does ...