Hi every body:
An exception is thrown when I open some files in linux, this doesn't occurrs when I do the same in windows XP.
This is the pierce of code that throws the exception:
I received this exception:
Exception in thread "main" java.io.IOExcep tion: No such file or directory
at java.io.FileInp utStream.readBy tes(Native Method)
at java.io.FileInp utStream.read(F ileInputStream. java:177)
at ca.co.coding.Ma in.readFileByte s(Main.java:45)
In windows I used the same file and the code is executed succesfully.
Could somebody tell me why is this happening ???
Thanks in advance
An exception is thrown when I open some files in linux, this doesn't occurrs when I do the same in windows XP.
This is the pierce of code that throws the exception:
Code:
42 public static byte[] readFileBytes(File file) throws IOException {
43 java.io.InputStream istr = new java.io.FileInputStream(file);
44 byte bytes[] = new byte[istr.available()];
45 istr.read(bytes);
46 istr.close();
47 return bytes;
48 }
Exception in thread "main" java.io.IOExcep tion: No such file or directory
at java.io.FileInp utStream.readBy tes(Native Method)
at java.io.FileInp utStream.read(F ileInputStream. java:177)
at ca.co.coding.Ma in.readFileByte s(Main.java:45)
In windows I used the same file and the code is executed succesfully.
Could somebody tell me why is this happening ???
Thanks in advance
Comment