public static String substituteRemote(String arg) {
		if (arg == null) {
			return null;
		}
		return Util.replaceAll(subUrlPattern, arg, m -> {
			String txt = m.group().substring(1);
			if (txt.startsWith("%")) {
				return Matcher.quoteReplacement(txt);
			}
			if (txt.startsWith("{") && txt.endsWith("}")) {
				txt = txt.substring(1, txt.length() - 1);
			}
			if (txt.startsWith("http://") || txt.startsWith("https://")) {
				try {
					return Matcher.quoteReplacement(Util.downloadAndCacheFile(txt).toString());
				} catch (IOException e) {
					throw new ExitException(BaseCommand.EXIT_INVALID_INPUT, "Error substituting remote file: " + txt,
							e);
				}
			} else if (txt.startsWith("deps:")) {
				List<String> deps = Arrays.asList(txt.substring(5).split(","));
				DependencyResolver resolver = new DependencyResolver();
				resolver.addDependencies(deps);
				ModularClassPath mcp = resolver.resolve();
				return mcp.getClassPath();
			} else {
				String type = txt.substring(0, txt.indexOf(":"));
				throw new ExitException(BaseCommand.EXIT_INVALID_INPUT, "Unknown substitution type: " + type);
			}
		});
	}
Determines the path to the JAR that contains the given class

@return An actual Path if it was found, or an empty path if it was not
src/main/java/dev/jbang/util/Util.java