wood burning stoves 2.0*
The moose likes Web Services and the fly likes regarding filerenameing when server is running Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "regarding filerenameing when server is running" Watch "regarding filerenameing when server is running" New topic
Author

regarding filerenameing when server is running

satya saha
Greenhorn

Joined: Aug 08, 2008
Posts: 13
i am calling a method of my class as a remote method from flex and i am using blazeds .
my method is like this

String path="c://JStudio//JStudio";
public String editFactBook(String factStoreName,String oldFactBookName,String newFactBookName)
{

String class name =path+factStoreName+"\\"+oldFactBookName + ".odt";
String newClassName =path+factStoreName+"\\"+newFactBookName ;
try
{
File file =new File(class name);
File new file =new File(newClassName);
if(file.exists())
{
file.rename to(new file);

}
else
{
return "no such file";
}
}
catch(Exception e)
{
e.printStackTrace();
}
return newFactBookName;
}
It is working fine using eclipse that means i am calling this method from main.
it is not working in server side.
can anybody please help me.
 
Don't get me started about those stupid light bulbs.
 
subject: regarding filerenameing when server is running
 
Similar Threads
Problem not loading a properties file
FTP downloading issues
Not able to retrieve files name s from a folder
What is the method to get the current directory(please read)
Connection Broken & Check??