File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RandomAccessFile

 
Doit
Ranch Hand
Posts: 169
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Why is this code not creating any file , even it does not exist
in the place??
- Thanks
import java.io.*;
public class a{
public static void main(String args[]) throws IOException
{
try{
RandomAccessFile f= new RandomAccessFile("c\\Java\\xx.txt","rw");
System.out.println("true");
System.out.println(f);
}
catch( IOException ie)
{System.out.println("Exception");
}
}
}
 
Doit
Ranch Hand
Posts: 169
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I take this back!!!
I was so stupid...
 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
hi,
what was the prob?
newtojava
 
Doit
Ranch Hand
Posts: 169
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The path i was looking at is wrong..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic