Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to read Network File

 
rocky raghu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I am facing a serious problem while reading a file thro network in my
web application.My App Server is iPlanet 6.0.I tried using weblogic and it is working fine

The following code works fine in Weblogic,but it does not work in Iplanet6.0 server.

File dir1=new File("\\\\3.222.222.22\\logs\\20060616.log");
System.out.println(" dir1.exists()-->"+ dir1.exists());
System.out.println(" dir1.exists()-->"+ dir1.getAbsolutePath());

File dir2=new File("G:\\Logs\\20060616.log");
System.out.println(" dir2.exists()-->"+ dir2.exists());
System.out.println(" dir2.exists()-->"+ dir2.getAbsolutePath());

OutPut(in iPlanet):
dir1.exists()-->false
dir1.-->\\3.222.222.22\logs\20060616.log
dir2.exists()-->false
dir2.getAbsolutePath()-->G:\Logs\20060616.log
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"rocky rocky",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic