Skip to main content

JV-CLI is a lightweight command-line tool for managing Java environments. Easily switch between Java versions, set JAVA_HOME, persist changes, and configure multiple installations effortlessly.

Project description

JV-CLI

Overview

jv-cli is a simple command-line utility for managing Java environment versions. It allows users to set JAVA_HOME, make it persistent, configure multiple Java installations, and execute Java commands using a default version.

Installation

You can install jv-cli using pip:

pip install jv-cli

Usage

Run the following command to see available options:

jv -h

Commands

  • Set JAVA_HOME to a specific version:

    jv -jv <version>
    
  • Persist JAVA_HOME change (Windows only):

    jv -jv <version> -P
    
  • Set a default Java version:

    jv -d <version>
    
  • Run Java using the default version:

    jv -java
    
  • Add a Java version to the config:

    jv --config <version> <path>
    

Configuration

jv-cli maintains its configuration in a JSON file located at:

  • Windows: %USERPROFILE%/.jv-config/config.json

The configuration file stores Java versions and their corresponding paths.

Example Usage

  1. Add Java versions to the configuration:

    jv --config 11 "C:\Program Files\Java\jdk-11"
    jv --config 17 "C:\Program Files\Java\jdk-17"
    
  2. Set Java 11 as the default:

    jv -d 11
    
  3. Switch to Java 17 temporarily:

    jv -jv 17
    
  4. Run the default Java version:

    jv -java
    

License

MIT License

Copyright (c) [Year] [Your Name]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jv-env-cli-1.0.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jv_env_cli-1.0.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file jv-env-cli-1.0.0.tar.gz.

File metadata

  • Download URL: jv-env-cli-1.0.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for jv-env-cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9f78a745dc2e1123d8ed9144348cee9288ee97f73e6062e1b00dec7c9246243a
MD5 8ab80b15cafefd784ea79d21095c6d42
BLAKE2b-256 c7f903b61087c0664de72dc490ef37d1113e064378474252454ca2edc2b13a81

See more details on using hashes here.

File details

Details for the file jv_env_cli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: jv_env_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for jv_env_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f4b618781d1375a88f255eaefc5c873dca596328ab50b9936927161045e5aa2d
MD5 ceb4442670879ee1ccf45977fda1aa74
BLAKE2b-256 4fa4d45ce4b815ee1f19e86948150f3a719ecc81cb3508f92af2e537344bd41a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page