JDK-Selector
Select your JDK anywhere, anytime by single or two commands
This library provides you opportunity to change JDK version instantly by some commands.
Simple usage
- Install JDK-Selector
- (Re)open terminal
- Type
jdk_selector_cli add name path
i.e jdk_selector_cli add "JDK 1.8" "C:\Program Files\Java\jdk1.8.0_321"
- Type
jdk_selector_cli use name
i.e jdk_selector_cli use "JDK 1.8"
- Done!
For details, please see jdk_selector_cli (help)
Build steps
- Install rustup https://rustup.rs/
- Clone this source
git clone https://github.com/Seungwoo-Yu/JDK-Selector
- Run cargo update in order to download dependencies
cargo update
- Build source
cargo run --bin jdk_selector_builder
- Check out
.build
folder in the source root!
Manual installation
- Copy files into anywhere you want
- Set JAVA_HOME Environment Variable to where you copy
- for Windows, See https://learn.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ee537574(v=office.14)#to-add-a-path-to-the-path-environment-variable
- for most Unix systems, See https://unix.stackexchange.com/a/26059 and keep in mind the sentence below,
Put the line to modify PATH in ~/.profile, or in ~/.bash_profile or if that's what you have. (If your login shell is zsh and not bash, put it in ~/.zprofile instead.)
- Append PATH Environment Variable with this
%JAVA_HOME% // bin MUST be excluded!
- Reopen terminal to affect changes
- Type this to check if it's installed successfully!
jdk_selector_cli help
Create installer
for Windows
- Install Inno setup 6
- Open the program and
jdk_selector_installer/windows/setup.iss
- Compile it!
- Check out Output folder in
jdk_selector_installer/windows/Output
TO-DOs
Create draft source written in rustCreate cross-platform builder in RustCreate Native installers for Windows- Create CI/CD for distribution for Windows
- Check availability on macOS and Linux distributions (Tested on Windows 10 only at this moment)
- Create Native installers and CI/CD for distribution for macOS/Linux
- Create Unit test for better refactoring
- Create document for welcomed PRs in future
- Add missing executors for other Java versions (Verified on Java 8 and 17)