aspose file tools*
The moose likes Beginning Java and the fly likes is it a security related issue ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "is it a security related issue ??" Watch "is it a security related issue ??" New topic
Author

is it a security related issue ??

Sanjeev Charla
Ranch Hand

Joined: Apr 02, 2009
Posts: 90



and the result is :


run:
file status :true
file not found : D:\ (The system cannot find the path specified)
BUILD SUCCESSFUL (total time: 0 seconds)


please explain, thank you.
Soumyajit Hazra
Ranch Hand

Joined: Jun 26, 2007
Posts: 136
Your FileOutputStream receives a drive name not a file name. Try with


Java Programmer | SCJP 1.5 | SCWCD 1.4
Sanjeev Charla
Ranch Hand

Joined: Apr 02, 2009
Posts: 90

ok ok,
in this case ??




run:
file status :false
file not found : H:\sample.txt (Access is denied)
BUILD SUCCESSFUL (total time: 0 seconds)
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19760
    
  20

Why did you switch from D: to H:? Do you even have an H: drive? If so, is it writable, and not a CD-ROM?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Sanjeev Charla
Ranch Hand

Joined: Apr 02, 2009
Posts: 90



actually in the previous post , i want to explain the reason.

H drive is not the cd rom and any read only type disc. it is a Hard disk.
this partition is in the second hard disc i have.
at first, i have tried to create files on H drive.
when it is throwing exception, i tried on D drive.
in those trails, i forget that i am using a drive (D:\\) and not a file (D:\\sample.txt) etc.

that is the whole story.

Sanjeev Charla
Ranch Hand

Joined: Apr 02, 2009
Posts: 90

please consider this also :






run:
file status :false
IO Exception : Access is denied
BUILD SUCCESSFUL (total time: 1 second)




Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19760
    
  20

Can you create a file in that directory from Windows itself?
Sanjeev Charla
Ranch Hand

Joined: Apr 02, 2009
Posts: 90

thank you,
by using your post, my problem is solved.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19760
    
  20

So can I assume the problem was caused by Windows security?
Sanjeev Charla
Ranch Hand

Joined: Apr 02, 2009
Posts: 90

yes,
file creation is not allowed at that place (on the partitions of , secondary hard disc) . . .
only folders are allowed . . . i don't know why this was happening . . . if possible, please explain the reason . . .
thanks once again,
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19760
    
  20

Ask your system administrator about file and folder rights.
 
Consider Paul's rocket mass heater.
 
subject: is it a security related issue ??