com.opera.core.systems
Class OperaPaths
java.lang.Object
com.opera.core.systems.OperaPaths
public class OperaPaths
- extends Object
This class tries to find the paths to Opera and the launcher on any system. If it cannot find a
launcher it will extract the appropriate one from the JAR it is in or attempt to copy it from the
source directory.
- Author:
- Stuart Knightley , Andreas Tolf Tolfsen , Deniz
Turkoglu
|
Method Summary |
static boolean |
isPathValid(String path)
Check that the given path is not null, not empty and that it exists. |
static String |
operaPath()
This method will try and find Opera on any platform. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OperaPaths
public OperaPaths()
operaPath
public static String operaPath()
- This method will try and find Opera on any platform. It performs the following steps:
1. Check the environment variable OPERA_PATH. If it exists, and the file it points to exists,
then return
2. Check if Opera exists at the default location on the respective OS
3. (Unix) Call `which opera` to find the location 4. Give up and return null
- Returns:
- the path to Opera, or null
isPathValid
public static boolean isPathValid(String path)
- Check that the given path is not null, not empty and that it exists.
- Parameters:
path - the path to check
- Returns:
- true if the path is valid, false otherwise
Copyright © 2012. All Rights Reserved.