export { JAVAC_FILENAME, JAVA_FILENAME } from "./utils"; export interface IOptions { /** * whether to parse version. */ withVersion?: boolean; /** * whether to check existence of javac or javac.exe */ checkJavac?: boolean; /** * whether to include tags for detailed information */ withTags?: boolean; /** * Additional parent folders to scan for Java Homes. * * Each entry is treated as a parent folder of possible Java Homes (not a * Java Home itself). Lookup is shallow: only direct subdirectories are * considered. Useful when consumers want to extend coverage without * waiting for a new release of this library. */ additionalLocations?: string[]; /** * whether to skip resolving from a specific source */ skipFrom?: { /** * from env.JAVA_HOME */ javaHomeEnv?: boolean; /** * from env.JDK_HOME */ jdkHomeEnv?: boolean; /** * from env.PATH */ inPathEnv?: boolean; /** * from SDKMAN */ sdkman?: boolean; /** * from JENV */ jenv?: boolean; /** * from Jabba */ jabba?: boolean; /** * from ASDF */ asdf?: boolean; /** * from mise */ mise?: boolean; /** * from Gradle locations */ gradle?: boolean; /** * from JBang locations */ jbang?: boolean; }; } export interface IJavaVersion { java_version: string; major: number; } export interface IJavaRuntime { /** * Home directory of Java runtime. */ homedir: string; /** * Version information. */ version?: IJavaVersion; /** * Whether javac or javac.exe exists. */ hasJavac?: boolean; /** * whether is same as env.JAVA_HOME */ isJavaHomeEnv?: boolean; /** * whether is same as env.JDK_HOME */ isJdkHomeEnv?: boolean; /** * whether '/bin' is one of env.PATH entries */ isInPathEnv?: boolean; isFromSDKMAN?: boolean; isFromJENV?: boolean; isFromJabba?: boolean; isFromJBang?: boolean; isFromASDF?: boolean; isFromMise?: boolean; isFromGradle?: boolean; } /** * Find Java runtime from all possible locations on your machine. * * @param options advanced options * @returns */ export declare function findRuntimes(options?: IOptions): Promise; /** * Verify if given directory contains a valid Java runtime, and provide details if it is. * * @param homedir home directory of a Java runtime * @param options * @returns */ export declare function getRuntime(homedir: string, options?: IOptions): Promise; /** * A utility to list all sources where given Java runtime is found. * * @param r given IJavaRuntime * @returns list of sources where given runtime is found. */ export declare function getSources(r: IJavaRuntime): string[];