edu.rice.cs.drjava
Class DrJavaRestart

java.lang.Object
  extended by edu.rice.cs.drjava.DrJavaRestart

public class DrJavaRestart
extends Object

Helper class for DrJava that copies a file and then starts it. Part of the automatic update in NewVersionPopup.

Version:
$Id: DrJavaRestart.java 5175 2010-01-20 08:46:32Z mgricken $

Field Summary
static int ATTEMPTS
          Number of attempts to delete or rename files.
static Log LOG
           
static int TIME_BETWEEN_ATTEMPTS
           
 
Constructor Summary
DrJavaRestart()
           
 
Method Summary
static boolean delete(File f)
           
static boolean deleteRecursively(File f)
           
static void main(String[] args)
           
static void message(String message)
           
static boolean rename(File from, File to)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTEMPTS

public static final int ATTEMPTS
Number of attempts to delete or rename files. This is necessary since an OS, particularly Windows, may still have a write lock on a file. Currently, we pause up to 5*1000 ms per operation.

See Also:
Constant Field Values

TIME_BETWEEN_ATTEMPTS

public static final int TIME_BETWEEN_ATTEMPTS
See Also:
Constant Field Values

LOG

public static Log LOG
Constructor Detail

DrJavaRestart

public DrJavaRestart()
Method Detail

message

public static void message(String message)

delete

public static boolean delete(File f)

deleteRecursively

public static boolean deleteRecursively(File f)

rename

public static boolean rename(File from,
                             File to)

main

public static void main(String[] args)