org.codehaus.cargo.container.internal.util
Class JdkUtils

java.lang.Object
  extended byorg.codehaus.cargo.container.internal.util.JdkUtils

public class JdkUtils
extends java.lang.Object

Set of common JDK utility methods.

Version:
$Id: JdkUtils.java 54 2004-08-29 13:25:57Z vmassol $

Constructor Summary
JdkUtils()
           
 
Method Summary
 java.io.File getToolsJar()
          Returns the file containing the JDK tools (such as the compiler).
 boolean isOSX()
          Is the user running on a Macintosh OS X system? Heuristic derived from Apple Tech Note 2042.
 void sleep(long ms)
          Pauses the current thread for the specified amount.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdkUtils

public JdkUtils()
Method Detail

getToolsJar

public final java.io.File getToolsJar()
                               throws java.io.FileNotFoundException
Returns the file containing the JDK tools (such as the compiler). This method must not be called on Mac OSX as there is no tools.jar file on that platform (everything is included in classes.jar).

Returns:
The tools.jar file
Throws:
java.io.FileNotFoundException - If the tools.jar file could not be found

isOSX

public final boolean isOSX()
Is the user running on a Macintosh OS X system? Heuristic derived from Apple Tech Note 2042.

Returns:
true if the user's system is determined to be Mac OS X.

sleep

public void sleep(long ms)
Pauses the current thread for the specified amount.

Parameters:
ms - The time to sleep in milliseconds


Copyright © 2004-2007 Codehaus. All Rights Reserved.