0

Hi buddies,

I m trying to rename the existing .jar file.But I can't.
If I make a copy of this and run the copied exe,by that time it works.

Code as follows,

boolean ReNameExistingEXE(String Dest)
	{
		String temp = Dest + "\\Star.jar";
		File s = new File(temp);
	
		String exName = Dest+"\\"+"Old "+s.getName();
		File s1 = new File(exName);
		boolean st = s.renameTo(s1);
		return st;
	}

pls help to make this work.

Edited by peter_budo: Adding code tags to old post

4
Contributors
4
Replies
5
Views
10 Years
Discussion Span
Last Post by stultuske
0

you can't make that work, as Windows will not allow files that are open by another process to be renamed.

Under Unix OSs it might work.

0

Thanks,

As I know, Windows can allow the MFC exe's to rename while running,but jar file ,i think JVM wont allow.

0

I try to rename .jar file but i cant that work so i request to u help me.
please........

start your own thread instead of re-opening an old one, and give more information as to what you are trying to accomplish and what you have tried so far

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.