Select your JDK anywhere, anytime by single or two commands
It was my first project in Rust and kind of draft so codes didn't look clean, straightforward and cover edge cases at most times.
Moreover, I felt this project could be used in more places than where I expected.
Therefore, to expand concept of project I decided to create and maintain another well-designed project.
Check repo: https://github.com/Seungwoo-Yu/Package-Select
JDK-Selector still does the job well on Windows and Linux (Amd64 only though) and arm64 macOS.
- 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)
- 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!
- 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
- 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
Create draft source written in rustCreate cross-platform builder in RustCreate Native installers for Windows- Create Native installers for Debian and Redhat distributions (Working...)
- Add multi-architecture support for jdk_selector_builder and jdk_selector_installer/linux
- Create CI/CD for distribution for Windows/Linux
- Check availability on macOS distributions (Tested on Windows 10 and Ubuntu 22.04 only at this moment)
- Create Native installers and CI/CD for distribution for macOS
- Create Unit test for better refactoring
- Create document for welcomed PRs in future
- Add missing executors for other Java versions (Verified on Oracle Java 8 and 17 on Windows 10 and OpenJDK Java 8 on Ubuntu 22.04)