Examples of toAbsolutePath()


Examples of java.nio.file.Path.toAbsolutePath()

     
      if (this.exists && !Files.exists(p)) {
        throw new JuRuntimeException("Path doesn't exist: %s (absolute: %s)", p, p.toAbsolutePath());
      }
      if (this.file && !Files.isRegularFile(p)) {
        throw new JuRuntimeException("Path is not a file: %s (absolute: %s)", p, p.toAbsolutePath());
      }
      if (this.directory && !Files.isDirectory(p)) {
        throw new JuRuntimeException("Path is not a directory: %s (absolute: %s)", p, p.toAbsolutePath());
      }
     
View Full Code Here

Examples of java.nio.file.Path.toAbsolutePath()

      }
      if (this.file && !Files.isRegularFile(p)) {
        throw new JuRuntimeException("Path is not a file: %s (absolute: %s)", p, p.toAbsolutePath());
      }
      if (this.directory && !Files.isDirectory(p)) {
        throw new JuRuntimeException("Path is not a directory: %s (absolute: %s)", p, p.toAbsolutePath());
      }
     
      return p;
    }
   
View Full Code Here

Examples of java.nio.file.Path.toAbsolutePath()

        try {
            if (!Files.exists(appDir))
                Files.createDirectory(appDir);
            return appDir;
        } catch (IOException e) {
            throw new RuntimeException("Application cache directory " + appDir.toAbsolutePath() + " could not be created.");
        }
    }

    private static Path getCacheDir() {
        final Path cache;
View Full Code Here

Examples of java.nio.file.Path.toAbsolutePath()

            if (javaHomePath == null) {
                throw new RuntimeException("Could not find Java installation for requested version "
                        + getAttribute(ATTR_MIN_JAVA_VERSION) + " / " + getAttribute(ATTR_JAVA_VERSION)
                        + ". You can override the used Java version with the -D" + PROP_CAPSULE_JAVA_HOME + " flag.");
            }
            javaHome = javaHomePath.toAbsolutePath().toString();
        }
        return javaHome;
    }

    private boolean isMatchingJavaVersion(String javaVersion) {
View Full Code Here

Examples of java.nio.file.Path.toAbsolutePath()

            debug("Local repo: " + localRepo);

            final boolean offline = "".equals(System.getProperty(PROP_OFFLINE)) || Boolean.parseBoolean(System.getProperty(PROP_OFFLINE));
            debug("Offline: " + offline);

            final DependencyManager dm = new DependencyManager(appId, localRepo.toAbsolutePath(), repositories, reset, offline);

            return dm;
        } catch (NoClassDefFoundError e) {
            throw new RuntimeException("Jar " + jar.getName()
                    + " contains a " + ATTR_DEPENDENCIES + " attribute or a " + ATTR_APP_ARTIFACT
View Full Code Here

Examples of java.nio.file.Path.toAbsolutePath()

    System.out.println(filePath.toAbsolutePath().normalize());

    System.out.println(filePath.toRealPath());

    Path nonExistingFilePath = Paths.get(".//lob//file.txt");
    System.out.println(nonExistingFilePath.toAbsolutePath());
   
    // Should exists on the filesystem!! Throws IOException !!!
//    nonExistingFilePath.toRealPath();
   
    System.out.println(nonExistingFilePath.compareTo(normalizedPath));
View Full Code Here

Examples of java.nio.file.Path.toAbsolutePath()

    }

    Path extraDir = extractDir.resolve(EXTRA_RESOURCES_DIR);
    if (Files.exists(extraDir)) {
      System.setProperty("EXTRA_RESOURCES_DIR", extraDir.toAbsolutePath().toString());
    }

    if (isWin) {
      String libraryPath = System.getProperty("java.library.path");
      libraryPath = extractDir.toString() + ";" + libraryPath;
View Full Code Here

Examples of java.nio.file.Path.toAbsolutePath()

        try {
            if (!Files.exists(appDir))
                Files.createDirectory(appDir);
            return appDir;
        } catch (IOException e) {
            throw new RuntimeException("Application cache directory " + appDir.toAbsolutePath() + " could not be created.");
        }
    }

    private static Path getCacheDir() {
        final Path cache;
View Full Code Here

Examples of java.nio.file.Path.toAbsolutePath()

                throw new RuntimeException("Could not find Java installation for requested version "
                        + getAttribute(ATTR_MIN_JAVA_VERSION) + " / " + getAttribute(ATTR_JAVA_VERSION)
                        + "(JDK required: " + jdk + ")"
                        + ". You can override the used Java version with the -D" + PROP_CAPSULE_JAVA_HOME + " flag.");
            }
            jhome = javaHomePath.toAbsolutePath().toString();
        }
        return jhome;
    }

    private boolean isMatchingJavaVersion(String javaVersion) {
View Full Code Here

Examples of java.nio.file.Path.toAbsolutePath()

            debug("Local repo: " + localRepo);

            final boolean offline = "".equals(System.getProperty(PROP_OFFLINE)) || Boolean.parseBoolean(System.getProperty(PROP_OFFLINE));
            debug("Offline: " + offline);

            final DependencyManager dm = new DependencyManager(localRepo.toAbsolutePath(), repositories, reset, offline);

            return dm;
        } catch (NoClassDefFoundError e) {
            throw new RuntimeException("Jar " + jar.getName()
                    + " specifies dependencies, while the necessary dependency management classes are not found in the jar");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.