Code example for Path

Methods: isAbsolute

     * @throws CompilationException 
     *             if the parsed source could not be compiled 
    public Script script(Source source, Path file) throws IOException, ParserException,
            CompilationException { 
        if (!file.isAbsolute()) {
            throw new IllegalArgumentException(String.format("'%s' is not an absolute path", file));
        return script(source, readFully(file));
     * Parses and compiles the javascript file. 
     * @param source 
     *            the script source descriptor 
     * @param sourceCode 
     *            the source code 
     * @return the compiled script 
     * @throws ParserException 
Connect your IDE to all the code out there  Get Codota for Java