File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Displaying a text File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Displaying a text File " Watch "Displaying a text File " New topic
Author

Displaying a text File

Jdinesh Tiwari
Ranch Hand

Joined: Jan 13, 2013
Posts: 35
Hi, All

According to this code specified in book
I am unable to see my File
as per the command specified at command promt
please see the last line n the comment very first.

Though my file exists D:



fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11311
    
  16

seems to work for me.

Can you be more specific in what the problem is? Did you compile it? Did you run it? What were the exact commands you gave? Did it show an error? what is in the file you are trying to display?


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Jdinesh Tiwari
Ranch Hand

Joined: Jan 13, 2013
Posts: 35
Hi, fred
No, there is no problem neither in its compilation nor in execution

Actually i had a file in D: with name TEST.TXT and want to see that very file

and for file display i was trying this program, but i am unable to see my file (i want that it should get open)
Ishan Pandya
Ranch Hand

Joined: Feb 06, 2012
Posts: 219

Seems good to me also.. It is displaying in my machine also.
Is your java file and the .txt file in the same directory? if no the store them into the same directory any run the program.


OCPJP
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Displaying a text File