UPDATE-JAVA-ALTERNATIVES(8)

πŸ“¦
version 0.77 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

✨ update-java-alternatives β€” bestie's guide to swapping your whole Java vibe ✨

okay so real talk, this is a System Manager's Manual page, section 8, and it's literally called update-java-alternatives. she's the friend who fixes your entire Java setup in one go instead of you doing it alternative-by-alternative like a clown. 🫢


🌸 NAME 🌸

update-java-alternatives β€” update alternatives for jre/sdk installations

like. she updates all the alternatives for a jre or sdk at once. no cap. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

update-java-alternatives [--jre] [--plugin] [-v|--verbose]
      -l|--list [<jname>]
      -s|--set <jname>
      -a|--auto
      -h|-?|--help

look at her. iconic. one command, a whole bunch of flags, so many options. πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

update-java-alternatives updates all alternatives belonging to one runtime or development kit for the Java language. like, the whole squad. not just one. πŸ’…

a package provides this info about its alternatives in:

/usr/lib/jvm/.<jname>.jinfo

that dot at the front? yes bestie, it's a hidden file. the way that <jname> sits in the middle with dots around it? it's giving filename. periodt.


🌈 OPTIONS 🌈

okay here's the menu, and every single one of them matters, so read it fr fr:

  • -l, --list [<jname>] β€” Lists all installed packages (or just <jname>) that provide info for setting a bunch of java alternatives. and if you go verbose? she shows you each alternative provided by the packages. every last one. πŸ‘€
  • -a, --auto β€” Switches all alternatives of registered jre/sdk installations to automatic mode. hands-off, let the system cook. ✨
  • -s, --set <jname> β€” Sets all alternatives of the registered jre/sdk installation to the program path provided by the <jname> installation. you're picking a winner and she's committing. πŸ’…
  • --jre β€” Limits the actions to alternatives that belong to a runtime environment, not a development kit. runtime-only, no dev-kit crumbs. πŸŽ€
  • --jre-headless β€” Limits the actions to alternatives that belong to the headless part of a runtime environment. no display, all business. 🧚
  • --plugin β€” Limits the actions to alternatives that provide browser plugins. throwback energy, honestly. πŸ¦‹
  • -h, --help β€” Displays a help message. she'll explain herself. πŸ’–
  • -v, --verbose β€” Verbose output. more words, more detail, more drama. πŸ“’
ngl, the --jre, --jre-headless and --plugin flags are limiters β€” they narrow the actions down, they don't add new ones. use them together with -l or -s and it all makes sense. iykyk. 🫢

πŸŽ€ FILES πŸŽ€

  • /usr/lib/jvm/.*.jinfo β€” A text file describing a jre/sdk installation. Consists of some variables of the form <var>=<value> and a list of alternatives of the form jre|jdk <name> <path>.

so like. variables. equals signs. and then a little list of alternatives where the first word is jre or jdk, then a name, then a path. that's the whole file format. slay. 🌸


πŸ‘‘ AUTHOR πŸ‘‘

update-java-alternatives and this manual page was written by Matthias Klose <doko@ubuntu.com>.

put some respect on the name. πŸ’œ


okay and the very last thing β€” the original page signs off with May 2006, from the System Manager's Manual, section 8. so yeah, she's been iconic since 2006 and she's still out here doing the most for your Java alternatives. πŸŒŸπŸ’…

bye bestie, go --list something 🫢

πŸ“¦ where this page comes from