jdkenv

command module
v0.0.0-...-a06519d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

README

= jdkenv image:https://img.shields.io/github/workflow/status/aurumcodex/jdkenv/jdkenv-build?style=flat-square[GitHub Workflow Status]

A simple Go program to manage and install (if not found) various JDKs.

Useful for when you use multiple JDK implementations, or want to build on different versions to test your
Java projects or other JVM language projects on different standard libraries.

Creates a directory `.jdkenv` in the `$HOME` directory, and will contain the downloaded JDK .tar.gz archives
fully extracted. Once a JDK has been selected, an `env` file will be created within the `.jdkenv` directory
that can then be sourced via a shell recfile. (`.bashrc`, `.zshrc`, `.profile`, etc.)

Takes quite a lot of inspiration from how JetBrains' IntelliJ IDEA IDE can download and use various JDKs.
(Even the `.toml` files take quite a lot of inspiration from IntelliJ's `*.intellij` files for its known JDKs.)

NOTE: Environment variable setting not yet implemented. macOS testing needs to be done,
as well as determining the best way of writing to Window's environment variables.

== Dependencies
- Go 1.15 (min version needs to be checked from deps)

== Installation
=== Using Go Modules
- Make sure `$GOBIN` and `$GOPATH` are set, and `$GOBIN` is added to your `$PATH`
- Run `go get -u github.com/aurumcodex/jdkenv`

== Usage
Running this program without a subcommand will only print the set JDK
and Java version given.

----
Usage:
  jdkenv [flags]
  jdkenv [command]

Available Commands:
  azul        Set usage of Azul Zulu Community JDK
  corretto    Set usage of Amazon Corretto JDK
  errors      Print error codes and their meanings
  help        Help about any command
  liberica    Set usage of BellSoft Liberica JDK
  local       Set usage of a locally installed JDK
  openjdk     Set usage of AdoptOpenJDK
  oracle      Set usage of Oracle OpenJDK Reference Implementation
  sapmachine  A brief description of your command
  system      Set usage of system installed JDK

Flags:
  -h, --help       help for jdkenv
  -j, --java int   use specific Java version (valid: 8, 11, 15) (default 8)
      --no-color   use monochrome output
      --spinner    disables the activity spinner (default true)
----

== Supported JDKs
// - Oracle OpenJDK `(Windows and Linux only)`
// ** JDK 8
// ** JDK 11
// ** JDK 15

// - Amazon Corretto
// ** JDK 8
// ** JDK 11

// - BellSoft Liberica
// ** JDK 8
// ** JDK 11
// ** JDK 15

// - AdoptOpenJDK
// ** JDK 8  `(Hotspot JVM / OpenJ9 JVM)`
// ** JDK 11 `(Hotspot JVM / OpenJ9 JVM)`
// ** JDK 15 `(Hotspot JVM / OpenJ9 JVM)`

// - SAP Sapmachine
// ** JDK 11
// ** JDK 15

// - Azul Zulu Community™
// ** JDK 8
// ** JDK 11
// ** JDK 15
[options="header",cols="h,4*"]
|===
| JDK Implementation  | Java 8 | Java 11 | Java 15 | Notes
| Oracle OpenJDK      | ✓      | ✓       | ✓       | `Windows and Linux Only`
| Amazon Corretto     | ✓      | ✓       |         | `none`
| BellSoft Liberica   | ✓      | ✓       | ✓       | `none`
| AdoptOpenJDK        | ✓      | ✓       | ✓       | `Hotspot and OpenJ9 JVMs supported`
| SAP Sapmachine      |        | ✓       | ✓       | `none`
| Azul Zulu Community | ✓      | ✓       | ✓       | `none`
|===

== License
JDKEnv is licensed under the Apache 2.0 License.
See link:LICENSE[LICENSE] for more details.

.Third Party libraries used (and their licenses)
- briandowns/spinner (Apache-2.0)
- cavaliercoder/grab (BSD-3)
- logrusorgru/aurora (Unlicense)
- mholt/archiver     (MIT)
- pelletier/go-toml  (MIT)
- spf13/cobra        (Apache-2.0)
- go-ini/ini         (Apache-2.0)

Documentation

Overview

Copyright © 2020 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
Package cmd contians various subcommands for jdkenv to run correctly.
Package cmd contians various subcommands for jdkenv to run correctly.
Package util contians various helping functions for jdkenv (i.e.
Package util contians various helping functions for jdkenv (i.e.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL