visad.install
Class JavaFile
java.lang.Object
java.io.File
visad.install.JavaFile
- All Implemented Interfaces:
- Serializable, Comparable<File>
public class JavaFile
- extends File
A File
object for a java executable
which also extracts the JVM's version information.
- See Also:
- Serialized Form
Method Summary |
int |
getMajor()
Get the major version number for this JVM. |
int |
getMinor()
Get the minor version number for this JVM. |
String |
getVersionString()
Get the version string returned by this JVM. |
boolean |
matchMinimum(int major,
int minor)
See if this JVM is at least as recent as the requested
major/minor pair. |
Methods inherited from class java.io.File |
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toString, toURI, toURL |
JavaFile
public JavaFile(String path)
- See Also:
File.File(String)
JavaFile
public JavaFile(File path)
- See Also:
File.File(String)
JavaFile
public JavaFile(String parent,
String child)
- See Also:
File.File(String, String)
JavaFile
public JavaFile(File path,
String name)
- See Also:
File.File(File, String)
getVersionString
public String getVersionString()
- Get the version string returned by this JVM.
For a 1.3.2 JVM, this method might return something like
"1.3.2_01".
- Returns:
- the version string for this JVM.
getMajor
public int getMajor()
- Get the major version number for this JVM.
For a 1.3.2 JVM, this method would return 1.
- Returns:
- the major version number for this JVM.
getMinor
public int getMinor()
- Get the minor version number for this JVM.
For a 1.3.2 JVM, this method would return 3.
- Returns:
- the minor version number for this JVM.
matchMinimum
public final boolean matchMinimum(int major,
int minor)
- See if this JVM is at least as recent as the requested
major/minor pair.
For example, if a Java2 JVM is required, this routine
would be called with major=1 and minor=2.
- Parameters:
major
- JVM major version numberminor
- JVM minor version number
- Returns:
- true if the JVM is at least the requested version.