JAVA-CONFIG

Section: User Commands (1)
Updated: September 2011
Page Index
 

NAME

java-config - The Java configuration tool for Gentoo  

SYNOPSIS

java-config [options]  

DESCRIPTION

java-config Is used to query/set properties of your system's Java environment. It can be used to list available VMs, java packages, set system default JVM and set user default JVM.

In addition, it is used by Portage as a common interface to querying properties about the various JVMs.  

OPTIONS

--select-vm=VM
Use this vm instead of the active vm when returning information.
-c, --javac
Show full path to currently selected Java compiler.
-j, --jar
Show full path to currently selected jar command.
-o, -O, --java-home, --jdk-home, --jre-home
Print JAVA_HOME of currently selected JVM.
-t, --tools
Print path to tools.jar
-v, --java-version
Query current JVM for version.
-p [pkg1[-SLOT],pkg2[-SLOT],...] --classpath[=package1,package2,...]
Calculate classpath for a package. If a package is installed in different slots you can also specify the slot to get the specific classpath informations.
-g VAR, --get-env=VAR
Print an environment variable from the active VM.
-e command, --exec=command
Run the specified JDK/JRE utility of the active vm, such as keytool , rmic and others.
-i PACKAGE(S), --library=PACKAGE(S)
Print java library paths for these packages. Used for example in wrapper scripts like this: -Djava.library.path=$(java-config -i swt-3). Follows the same pkg[-SLOT] convention as for example --classpath.
-l, --list-available-packages
List available Java packages. Used for selection by --classpath
-L, --list-available-vms
Lists available JVMs. Used with --set-system-vm and -set-user-vm
-S <vm-id>, --set-system-vm=<vm-id>
Sets the system-wide default JVM.
-s <vm-id>, --set-user-vm=<vm-id>
Sets the user-specific JVM by putting all necessary env vars into $HOME/.gentoo/java-env .
-f, --show-active-vm
Show the JVM that's currently active, as set via --set-system-vm or --set-user-vm.
-n, --nocolor
Turn off all colors.
-P <vm-id>, --print=<vm-id>
Print the environment information for the specified virtual machine.
-d, --with-dependencies
Include package dependencies in --classpath and --library calls.
-r, --runtime
Print the runtime classpath.
--package=PACKAGE(S)
Retrieve a value from a packages package.env file, value is specified by --query.
-q QUERY, --query=QUERY
Value to retieve from packages package.env file, specified by --package.
--get-virtual-providers=PACKAGE(S)
Return a list of packages that provide a virtual.

 

NOTES

You can get the <vm-id> that is used with --set-system-vm=<vm-id> and --set-user-vm=<vm-id> in the output of java-config --list-available-vms inside the brackets. Ex. [blackdown-jdk-1.4.1] and you can use this to set your default Java Virtual Machine.

 

MAINTAINER

java@gentoo.org  

AUTHORS

Karl Trygve Kalleberg <karltk@gentoo.org>
Adrian Almenar <strider@gentoo.org>
Jason Mobarak <aether@gentoo.org>

 

BUGS

Report any bugs you find to https://bugs.gentoo.org/.

 

SEE ALSO

env-update(5)
The /usr/bin/java-config script.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
NOTES
MAINTAINER
AUTHORS
BUGS
SEE ALSO