https://github.com/minghu6/jvirtualenv
A micro Java Environment Switch inspired by virtualenv
https://github.com/minghu6/jvirtualenv
java python3 shell
Last synced: about 2 months ago
JSON representation
A micro Java Environment Switch inspired by virtualenv
- Host: GitHub
- URL: https://github.com/minghu6/jvirtualenv
- Owner: minghu6
- Created: 2017-10-04T17:43:21.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-03-28T09:12:36.000Z (about 5 years ago)
- Last Synced: 2025-12-26T21:14:46.252Z (6 months ago)
- Topics: java, python3, shell
- Language: Python
- Homepage:
- Size: 26.4 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://badge.fury.io/py/jvirtualenv)
[](https://codebeat.co/projects/github-com-minghu6-jvirtualenv-master)
# jvirtualenv
A micro Java environment switch which inspired by `virtualenv`.
## OS Supports:
Linux and any other OS whose shell is bash or zsh.
Windows.
## Requirements:
### 1. JDK
* **Linux**
JDK(*Oracle JDK*) should be placed on a folder whose name is `java`
and its name should startswith `jdk`.
exp: `/opt/java/jdk-9`,`/opt/java/jdk1.8.0_144`
* **Windows**
Just use the default installation directory of `Oracle JDK`
* **Other**
you can run the jvirtualenv in the parent directory of JDK.
Or edit the config file directly. (not recommented)
The config file should be as followed:
```
[
{
"tag": "14.0:2:64",
"version": "14.0.2",
"bit": "64",
"home": "/opt/java/jdk-9"
},
{
"tag": "1:8:0:32",
"version": "1.8.0_144",
"bit": "32",
"home": "/opt/java/jdk1.8.0_144"
}
]
```
### 2. Python3
## Usage:
1. `pip3 install jvirtualenv`
2. `jvirtualenv list-tag` (view all jdk tag)
3. `jvirtualenv -j 1.8 ` (if 1.8 is prefix of someone tag)
4. `source /bin/activate` or `\\bin\\activate.bat` (windows cmd) (activate virtual java env)
5. `deactivate` or `\\bin\\deactivate.bat`(deactivate the virtualenv)
**FOR EXCELLENT PYTHON3 AND VIRTUALENV!**