Skip to content

Instantly share code, notes, and snippets.

@mvdkwast
mvdkwast / switch-jdk.pl
Last active January 21, 2022 13:18
Switch jdk versions (bash + perl)
#!/usr/bin/env perl
use v5.28;
use Data::Dumper;
use Tie::IxHash;
my @jdk_paths = qw{~/.jdks /usr/lib/jvm};
my @jdks;
push @jdks, glob "$_/*-*" for @jdk_paths;