Skip to content
Advertisement

Tag: dev-null

Java: FileOutputStream(“NUL:”) not working after Java upgrade

On Windows, NUL is the null output device similar to /dev/null on Linux. With Oracle Java 8 Update 331, trying to get a new FileOutputStream(“NUL:”) throws an exception. Previously (Java 8u321) it worked fine. The problem seems to be the colon: new FileOutputStream(“NUL”) – OK new FileOutputStream(“NUL:”) – exception Can anyone point me to docs or JDK sources regarding this

Advertisement