This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Servlets and the fly likes Need Urgent Help Unable to read File from C: Drive Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic

Need Urgent Help Unable to read File from C: Drive

Syed Ali

Joined: Oct 08, 2008
Posts: 29
Please i need urgent hep, i tried all articles from google to solve this simple issue but nothing is working

i am only trying to read a simple image file from C drive in the image directory C://image but unable to create a file from server , it works in the windows env but does not work when war file is uploaded on server.

please need help my projret dead line is close but no solution is working.

String prefix = "C:\\image\\";
String imageName = "image.gif";

File file = new File(prefix+imageName);

Unable to make file from above code, please guide me what i am doing wrong , it works in the windows environment but says file not found when uploaded to tomcat server on the internet.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63873

This is the same question as your other posts. Please continue any discussion in your original post.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Need Urgent Help Unable to read File from C: Drive
It's not a secret anymore!