Jvm
Attributes
Members list
Value members
Concrete methods
Runs a JVM subprocess with the given configuration and returns a os.CommandResult with it's aggregated output and error streams.
Runs a JVM subprocess with the given configuration and returns a os.CommandResult with it's aggregated output and error streams.
Value parameters
- check
-
if
true
, an exception will be thrown if process exits with a non-zero exit code - classPath
-
The classpath
- cpPassingJarPath
-
When
None
, the-cp
parameter is used to pass the classpath to the forked JVM. WhenSome
, a temporary empty JAR is created which contains aClass-Path
manifest entry containing the actual classpath. This might help with long classpaths on OS'es (like Windows) which only supports limited command-line length - cwd
-
The working directory to be used by the forked JVM
- destroyOnExit
-
Destroy on JVM exit
- env
-
Environment variables used when starting the forked JVM
- javaHome
-
Optional Java Home override
- jvmArgs
-
Arguments given to the forked JVM
- mainArgs
-
Args passed to the
mainClass
main method - mainClass
-
The main class to run
- mergeErrIntoOut
-
If
true
then the error output is merged into standard output - propagateEnv
-
If
true
then the current process' environment variables are propagated to subprocess - shutdownGracePeriod
-
if the timeout is enabled, how long in milliseconds for the subprocess to gracefully terminate before attempting to forcibly kill it (-1 for no kill, 0 for always kill immediately)
- stderr
-
Standard error
- stdin
-
Standard input
- stdout
-
Standard output
- timeout
-
how long to wait in milliseconds for the subprocess to complete (-1 for no timeout)
Attributes
- Source
- Jvm.scala
Creates a java.net.URLClassLoader
with specified parameters
Creates a java.net.URLClassLoader
with specified parameters
Value parameters
- classPath
-
URLs from which to load classes and resources
- parent
-
parent class loader for delegation
- sharedLoader
-
loader used for shared classes
- sharedPrefixes
-
package prefix for classes that will be loaded by the
sharedLoader
Attributes
- Returns
-
new classloader
- Source
- Jvm.scala
Attributes
- Source
- Jvm.scala
Create a JAR file with default inflation level.
Create a JAR file with default inflation level.
Value parameters
- fileFilter
-
A filter to support exclusions of selected files
- includeDirs
-
If
true
the JAR archive will contain directory entries. According to the ZIP specification, directory entries are not required. In the Java ecosystem, most JARs have directory entries, so including them may reduce compatibility issues. Directory entry names will result with a trailing/
. - inputPaths
-
The input paths resembling the content of the JAR file. Files will be directly included in the root of the archive, whereas for directories their content is added to the root of the archive.
- jar
-
The final JAR file
- manifest
-
The JAR Manifest
- timestamp
-
If specified, this timestamp is used as modification timestamp (mtime) for all entries in the JAR file. Having a stable timestamp may result in reproducible files, if all other content, including the JAR Manifest, keep stable.
Attributes
- Source
- Jvm.scala
Attributes
- Source
- Jvm.scala
Attributes
- Source
- Jvm.scala
Resolves a tool to a path under the currently used JDK (if known).
Attributes
- Source
- Jvm.scala
Runs a JVM subprocess with the given configuration and streams it's stdout and stderr to the console.
Runs a JVM subprocess with the given configuration and streams it's stdout and stderr to the console.
Value parameters
- classPath
-
The classpath
- cpPassingJarPath
-
When
None
, the-cp
parameter is used to pass the classpath to the forked JVM. WhenSome
, a temporary empty JAR is created which contains aClass-Path
manifest entry containing the actual classpath. This might help with long classpaths on OS'es (like Windows) which only supports limited command-line length - cwd
-
The working directory to be used by the forked JVM
- destroyOnExit
-
Destroy on JVM exit
- env
-
Environment variables used when starting the forked JVM
- javaHome
-
Optional Java Home override
- jvmArgs
-
Arguments given to the forked JVM
- mainArgs
-
Args passed to the
mainClass
main method - mainClass
-
The main class to run
- mergeErrIntoOut
-
If
true
then the error output is merged into standard output - propagateEnv
-
If
true
then the current process' environment variables are propagated to subprocess - shutdownGracePeriod
-
if the timeout is enabled, how long in milliseconds for the subprocess to gracefully terminate before attempting to forcibly kill it (-1 for no kill, 0 for always kill immediately)
- stderr
-
Standard error override
- stdin
-
Standard input override
- stdout
-
Standard output override
Attributes
- Source
- Jvm.scala
Attributes
- Source
- Jvm.scala
Type parameters
- T
-
the return type of this function
Value parameters
- classPath
-
URLs from which to load classes and resources
- f
-
function that will be called with newly created classloader
- parent
-
parent class loader for delegation
- sharedPrefixes
-
package prefix for classes that will be loaded by the shared loader
Attributes
- Returns
-
return value of the function
f
- Source
- Jvm.scala
Inherited methods
Attributes
- Inherited from:
- CoursierSupport
- Source
- CoursierSupport.scala
Attributes
- Inherited from:
- CoursierSupport
- Source
- CoursierSupport.scala
Resolve dependencies using Coursier.
Resolve dependencies using Coursier.
We do not bother breaking this out into the separate ZincWorkerApi classpath, because Coursier is already bundled with mill/Ammonite to support the import $ivy
syntax.
Attributes
- Inherited from:
- CoursierSupport
- Source
- CoursierSupport.scala
Attributes
- Inherited from:
- CoursierSupport
- Source
- CoursierSupport.scala
Resolve java home using Coursier.
Resolve java home using Coursier.
The id string has format "$DISTRIBUTION:$VERSION". e.g. graalvm-community:23.0.0
Attributes
- Inherited from:
- CoursierSupport
- Source
- CoursierSupport.scala