Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
    Bookmark Topic Watch Topic
  • New Topic

Need Urgent Help Unable to read File from C: Drive

 
Syed Ali
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
This is the same question as your other posts. Please continue any discussion in your original post.
 
    Bookmark Topic Watch Topic
  • New Topic