Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ...
- ...
- ...
- */
- public Spark() {
- }
- public void startup() {
- if (System.getenv("APPDATA") != null && !System.getenv("APPDATA").equals("")) { // Checks if an %APPDATA% Folder exists
- USER_SPARK_HOME = System.getenv("APPDATA") + "/" + getUserConf();
- // This retrieves the same Folder as %APPDATA% in the file explorer would
- } else {
- USER_SPARK_HOME = System.getProperties().getProperty("user.home") + "/" + getUserConf();
- // On non windows machines well use ~/ as folder
- // ( Users/username/ is the same as ~/ )
- }
- String current = System.getProperty("java.library.path");
- String classPath = System.getProperty("java.class.path");
- // Set UIManager properties for JTree
- System.setProperty("apple.laf.useScreenMenuBar", "true");
- ...
- ...
- ...
- ...
- ...
- /**
- * Keep track of the users configuration directory.
- *
- * @return Directory name depending on Operating System.
- */
- public static String getUserConf() {
- if (isLinux()) {
- return ".SomeOtherName"; // THis is the Path for Linux
- // ~/.Spark
- }
- else if(isMac())
- {
- return "Library/Application Support/SomeOtherName";
- // ~/Library/Application Support/Spark
- }
- else
- return "SomeOtherName";
- // Path for windows was set before this is only the Folder name
- }
- ...
- ...
- ...
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement