FULL PRODUCT VERSION :
java version "1.5.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09)
Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Windows XP Pro Service Pack 2
EXTRA RELEVANT SYSTEM CONFIGURATION :
SCSI Tape Device using an Adaptec SCSI 19160-ULTRA 160.
SCSI Tape Device is a Quantum DLT8000 SCSI Sequential Device
A DESCRIPTION OF THE PROBLEM :
When attempting to open a FileOutputStream on a windows device the FileoutputStream throws a FileNotFoundException (The parameter is incorrect). This works for reading the device using a FileInputStream.
This was also tested on Linux and it works for both FileInputStreams and FileOutputStreams.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
This is broken in windows:
FileOutputStream out = new FileOutputStream(new File("\\\\.\\Tape0");
This works in windows:
FileInputStream in= new FileInputStream(new File("\\\\.\\Tape0");
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I was expecting to get a valid FileOutoutStream that I would be able to write to just like in the Linux Environment.
ACTUAL -
java.io.FileNotFoundException: \\.\Tape0 (The parameter is incorrect)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at com.ice.tar.tar.instanceMain(tar.java:204)
at com.ice.tar.tar.main(tar.java:151)
no processing due to errors
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.io.FileNotFoundException: \\.\Tape0 (The parameter is incorrect)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at com.ice.tar.tar.instanceMain(tar.java:204)
at com.ice.tar.tar.main(tar.java:151)
no processing due to errors
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
try {
outStream = new FileOutputStream( new File("\\\\.\\Tape0") );
}
catch ( IOException ex )
{
outStream = null;
ex.printStackTrace( System.err );
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
I am working on it.
###@###.### 2005-04-27 13:25:48 GMT
java version "1.5.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09)
Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Windows XP Pro Service Pack 2
EXTRA RELEVANT SYSTEM CONFIGURATION :
SCSI Tape Device using an Adaptec SCSI 19160-ULTRA 160.
SCSI Tape Device is a Quantum DLT8000 SCSI Sequential Device
A DESCRIPTION OF THE PROBLEM :
When attempting to open a FileOutputStream on a windows device the FileoutputStream throws a FileNotFoundException (The parameter is incorrect). This works for reading the device using a FileInputStream.
This was also tested on Linux and it works for both FileInputStreams and FileOutputStreams.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
This is broken in windows:
FileOutputStream out = new FileOutputStream(new File("\\\\.\\Tape0");
This works in windows:
FileInputStream in= new FileInputStream(new File("\\\\.\\Tape0");
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I was expecting to get a valid FileOutoutStream that I would be able to write to just like in the Linux Environment.
ACTUAL -
java.io.FileNotFoundException: \\.\Tape0 (The parameter is incorrect)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at com.ice.tar.tar.instanceMain(tar.java:204)
at com.ice.tar.tar.main(tar.java:151)
no processing due to errors
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.io.FileNotFoundException: \\.\Tape0 (The parameter is incorrect)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at com.ice.tar.tar.instanceMain(tar.java:204)
at com.ice.tar.tar.main(tar.java:151)
no processing due to errors
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
try {
outStream = new FileOutputStream( new File("\\\\.\\Tape0") );
}
catch ( IOException ex )
{
outStream = null;
ex.printStackTrace( System.err );
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
I am working on it.
###@###.### 2005-04-27 13:25:48 GMT
- relates to
-
JDK-8022671 Revisit the Logic of Handling Devices In Java IO/NIO Functions
- Open